JavaScript syntax error

  • SYNTAX_ERROR
  • Error
  • High
  • No tags

This rule applies when JavaScript file has syntax errors.

Noncompliant Code Example

View with compliant examples side by side
// Example 1
varr x; // SYNTAX_ERROR alarm

// Example 2
var regexp = /?/g; // SYNTAX_ERROR alarm

Compliant Code Example

View with noncompliant examples side by side
// Example 1
var x;

// Example 2
var regexp = /a?/g;

Version

This rule was introduced in DeepScan 1.0.0-alpha.

Was this documentation helpful?