Built-in API should be called with the correct number of arguments

  • MISMATCHED_COUNT_OF_ARGS
  • Error
  • Medium, Low
  • cwe

This rule applies when built-in API is called with the wrong number of arguments.

Because built-in has the specification for its arguments, arguments are useless or cause undefined behavior if the number of arguments does not match.

Noncompliant Code Example

View with compliant examples side by side
var y = Math.atan2(a/b); // MISMATCHED_COUNT_OF_ARGS alarm

Compliant Code Example

View with noncompliant examples side by side
var y = Math.atan2(a, b);

Version

This rule was introduced in DeepScan 1.0.0-alpha.

See

Was this documentation helpful?