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

  • 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);


This rule was introduced in DeepScan 1.0.0-alpha.


Was this documentation helpful?