Comma should not be missing between function arguments or array elements

  • MISSING_COMMA
  • Code Quality
  • Medium
  • No tags

This rule applies when comma (,) seems to be missing between function arguments or array elements.

For example, in code f(x. y), it is likely that comma was intended instead of dot (.).

If it is programmer's intention, removing the unnecessary space is recommended for readability and maintainability.

Noncompliant Code Example

View with compliant examples side by side
reject('Create badge failed: '. err); // MISSING_COMMA alarm

Compliant Code Example

View with noncompliant examples side by side
reject('Create badge failed: ', err);

Version

This rule was introduced in DeepScan 1.0.0-alpha.

Was this documentation helpful?