Built-in API should be called with the correct number of arguments
- Medium, Low
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 ExampleView with compliant examples side by side
var y = Math.atan2(a/b); // MISMATCHED_COUNT_OF_ARGS alarm
Compliant Code ExampleView with noncompliant examples side by side
var y = Math.atan2(a, b);
This rule was introduced in DeepScan 1.0.0-alpha.