Showing 193 of 398 total issues

Avoid deeply nested control flow statements.
Open

                                if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
                                    var octToDec = this.octalToDecimal(ch);
                                    octal = octToDec.octal || octal;
                                    str += String.fromCharCode(octToDec.code);
                                }
Severity: Major
Found in dist/csp.tmpl.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                  if (r instanceof ReturnValue){ // break out
                    if (r.type == 'break') break
                    result = r;
                  }
    Severity: Major
    Found in dist/csp.tmpl.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

              if (~beforeReWords.indexOf(code.slice(pos + 1, end))) {
                start = next
              }
      Severity: Major
      Found in dist/es6.tmpl.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                    if (match[1]) {
                      if (match[1] === ch) ++ix
                      else if (!--ix) break
                    } else {
                      rech.lastIndex = pushQBlock(match.index, rech.lastIndex, match[2])
        Severity: Major
        Found in dist/es6.tmpl.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                    while (--pos >= 0 && RE_VN_CHAR.test(code[pos]));
          Severity: Major
          Found in dist/tmpl.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                        if (match[1]) {
                          if (match[1] === ch) ++ix
                          else if (!--ix) break
                        } else {
                          rech.lastIndex = pushQBlock(match.index, rech.lastIndex, match[2])
            Severity: Major
            Found in src/brackets.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                            if (r instanceof ReturnValue){ // break out
                              if (r.type == 'break') break
                              result = r
                            }
              Severity: Major
              Found in src/notevil/index.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                        while (--pos >= 0 && RE_VN_CHAR.test(code[pos]));
                Severity: Major
                Found in src/skip-regex.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                if (match[1]) {
                                  if (match[1] === ch) ++ix
                                  else if (!--ix) break
                                } else {
                                  rech.lastIndex = pushQBlock(match.index, rech.lastIndex, match[2])
                  Severity: Major
                  Found in dist/tmpl.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                              if (~beforeReWords.indexOf(code.slice(pos + 1, end))) {
                                start = next
                              }
                    Severity: Major
                    Found in dist/tmpl.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                              if (~beforeReWords.indexOf(code.slice(pos + 1, end))) {
                                start = next
                              }
                      Severity: Major
                      Found in src/skip-regex.js - About 45 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                                if (str === '===' || str === '!==' || str === '>>>' ||
                                                    str === '<<=' || str === '>>=' || str === '**=') {
                                                    this.index += 3;
                                                }
                                                else {
                        Severity: Major
                        Found in dist/csp.tmpl.js - About 40 mins to fix

                          Function MethodDefinition has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  function MethodDefinition(key, computed, value, kind, isStatic) {
                          Severity: Minor
                          Found in dist/csp.tmpl.js - About 35 mins to fix

                            Function Primitives has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function Primitives (context) {
                              if (this instanceof Primitives) {
                                this.context = context
                                for (var i = 0; i < names.length; i++) {
                                  if (!this.context[names[i]]) {
                            Severity: Minor
                            Found in src/notevil/lib/primitives.js - About 35 mins to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

                            Avoid too many return statements within this function.
                            Open

                                    return result
                            Severity: Major
                            Found in dist/csp.tmpl.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                        return finalValue(blockContext[node.name])
                              Severity: Major
                              Found in dist/csp.tmpl.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                                return this.scanNumericLiteral();
                                Severity: Major
                                Found in dist/csp.tmpl.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                          return obj
                                  Severity: Major
                                  Found in dist/csp.tmpl.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                            return primitives.applyNew(target, args)
                                    Severity: Major
                                    Found in dist/csp.tmpl.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                              return checkValue(obj[prop]);
                                      Severity: Major
                                      Found in dist/csp.tmpl.js - About 30 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language