jish/pre-commit

View on GitHub
lib/pre-commit/support/jslint/lint.js

Summary

Maintainability
F
4 mos
Test Coverage

Function JSLINT has a Cognitive Complexity of 2493 (exceeds 5 allowed). Consider refactoring.
Open

var JSLINT = (function () {
    var adsafe_id,      // The widget's ADsafe id.
        adsafe_may,     // The widget may load approved scripts.
        adsafe_went,    // ADSAFE.go has been called.
        anonname,       // The guessed name for anonymous functions.
Severity: Minor
Found in lib/pre-commit/support/jslint/lint.js - About 1 mo 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

Function JSLINT has 4801 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var JSLINT = (function () {
    var adsafe_id,      // The widget's ADsafe id.
        adsafe_may,     // The widget may load approved scripts.
        adsafe_went,    // ADSAFE.go has been called.
        anonname,       // The guessed name for anonymous functions.
Severity: Major
Found in lib/pre-commit/support/jslint/lint.js - About 3 wks to fix

    File lint.js has 4804 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // jslint.js
    // 2010-02-20
    
    /*
    Copyright (c) 2002 Douglas Crockford  (www.JSLint.com)
    Severity: Major
    Found in lib/pre-commit/support/jslint/lint.js - About 1 wk to fix

      Function lex has 662 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          var lex = (function lex() {
              var character, from, line, s;
      
      // Private lex methods
      
      
      Severity: Major
      Found in lib/pre-commit/support/jslint/lint.js - About 3 days to fix

        Function token has 556 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    token: function () {
                        var b, c, captures, d, depth, high, i, l, low, q, t;
        
                        function match(x) {
                            var r = x.exec(s), r1;
        Severity: Major
        Found in lib/pre-commit/support/jslint/lint.js - About 2 days to fix

          Function html has 195 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function html() {
                  var a, attributes, e, n, q, t, v, w = option.white, wmode;
                  xmode = 'html';
                  xquote = '';
                  stack = null;
          Severity: Major
          Found in lib/pre-commit/support/jslint/lint.js - About 7 hrs to fix

            Function itself has 141 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var itself = function (s, o) {
                    var a, i;
                    JSLINT.errors = [];
                    predefined = Object.create(standard);
                    if (o) {
            Severity: Major
            Found in lib/pre-commit/support/jslint/lint.js - About 5 hrs to fix

              Function doTag has 118 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function doTag(n, a) {
                      var i, t = htmltag[n], x;
                      src = false;
                      if (!t) {
                          error("Unrecognized tag '<{a}>'.",
              Severity: Major
              Found in lib/pre-commit/support/jslint/lint.js - About 4 hrs to fix

                Function styleSelector has 114 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function styleSelector() {
                        if (nexttoken.identifier) {
                            if (!is_own(htmltag, nexttoken.value)) {
                                warning("Expected a tagName, and instead saw {a}.",
                                    nexttoken, nexttoken.value);
                Severity: Major
                Found in lib/pre-commit/support/jslint/lint.js - About 4 hrs to fix

                  Function string has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                  function string(x) {
                                      var c, j, r = '';
                  
                                      if (jsonmode && x !== '"') {
                                          warningAt("Strings must use doublequote.",
                  Severity: Major
                  Found in lib/pre-commit/support/jslint/lint.js - About 4 hrs to fix

                    Function report has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        itself.report = function (option) {
                            var data = itself.data();
                    
                            var a = [], c, e, err, f, i, k, l, m = '', n, o = [], s;
                    
                    
                    Severity: Major
                    Found in lib/pre-commit/support/jslint/lint.js - About 4 hrs to fix

                      Function doOption has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function doOption() {
                              var b, obj, filter, o = nexttoken.value, t, v;
                              switch (o) {
                              case '*/':
                                  error("Unbegun comment.");
                      Severity: Major
                      Found in lib/pre-commit/support/jslint/lint.js - About 3 hrs to fix

                        Function labelled has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            blockstmt('switch', function () {
                                var t = nexttoken,
                                    g = false;
                                funct['(breakage)'] += 1;
                                advance('(');
                        Severity: Major
                        Found in lib/pre-commit/support/jslint/lint.js - About 3 hrs to fix

                          Function jsonValue has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function jsonValue() {
                          
                                  function jsonObject() {
                                      var o = {}, t = nexttoken;
                                      advance('{');
                          Severity: Major
                          Found in lib/pre-commit/support/jslint/lint.js - About 3 hrs to fix

                            Function labelled has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                blockstmt('for', function () {
                                    var f = option.forin, s, t = nexttoken;
                                    funct['(breakage)'] += 1;
                                    funct['(loopage)'] += 1;
                                    advance('(');
                            Severity: Major
                            Found in lib/pre-commit/support/jslint/lint.js - About 3 hrs to fix

                              Function nud has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      nud: function () {
                                          var v = this.value,
                                              s = scope[v],
                                              f;
                                          if (typeof s === 'function') {
                              Severity: Major
                              Found in lib/pre-commit/support/jslint/lint.js - About 2 hrs to fix

                                Function statements has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function statements(begin) {
                                        var a = [], f, p;
                                        if (begin && !use_strict() && option.strict) {
                                            warning('Missing "use strict" statement.', nexttoken);
                                        }
                                Severity: Major
                                Found in lib/pre-commit/support/jslint/lint.js - About 2 hrs to fix

                                  Function data has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      itself.data = function () {
                                  
                                          var data = {functions: []}, fu, globals, implieds = [], f, i, j,
                                              members = [], n, unused = [], v;
                                          if (itself.errors.length) {
                                  Severity: Major
                                  Found in lib/pre-commit/support/jslint/lint.js - About 2 hrs to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                                                if ((i.id === '(number)' && /[.+\-Ee]/.test(i.value)) ||
                                                                        (i.id === '-' && !i.right) ||
                                                                        i.id === '(string)' || i.id === '[' ||
                                                                        i.id === '{' || i.id === 'true' ||
                                                                        i.id === 'false' ||
                                    Severity: Critical
                                    Found in lib/pre-commit/support/jslint/lint.js - About 2 hrs to fix

                                      Function exps has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          infix('(', function (left, that) {
                                              adjacent(prevtoken, token);
                                              nospace();
                                              var n = 0,
                                                  p = [];
                                      Severity: Major
                                      Found in lib/pre-commit/support/jslint/lint.js - About 2 hrs to fix

                                        Function styleValue has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            function styleValue(v) {
                                                var i = 0,
                                                    n,
                                                    once,
                                                    match,
                                        Severity: Major
                                        Found in lib/pre-commit/support/jslint/lint.js - About 2 hrs to fix

                                          Function doAttribute has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              function doAttribute(n, a, v) {
                                                  var u, x;
                                                  if (a === 'id') {
                                                      u = typeof v === 'string' ? v.toUpperCase() : '';
                                                      if (ids[u] === true) {
                                          Severity: Major
                                          Found in lib/pre-commit/support/jslint/lint.js - About 2 hrs to fix

                                            Function cssColor has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                function cssColor() {
                                                    var i, number, value;
                                                    if (nexttoken.identifier) {
                                                        value = nexttoken.value;
                                                        if (value === 'rgb' || value === 'rgba') {
                                            Severity: Major
                                            Found in lib/pre-commit/support/jslint/lint.js - About 2 hrs to fix

                                              Function nud has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                      x.nud = function () {
                                                          var b, i, s, seen = {};
                                                          b = token.line !== nexttoken.line;
                                                          if (b) {
                                                              indent += option.indent;
                                              Severity: Major
                                              Found in lib/pre-commit/support/jslint/lint.js - About 2 hrs to fix

                                                Function advance has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                    function advance(id, t) {
                                                        switch (token.id) {
                                                        case '(number)':
                                                            if (nexttoken.id === '.') {
                                                                warning(
                                                Severity: Minor
                                                Found in lib/pre-commit/support/jslint/lint.js - About 2 hrs to fix

                                                  Function statement has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      function statement(noindent) {
                                                          var i = indent, r, s = scope, t = nexttoken;
                                                  
                                                  // We don't like the empty statement.
                                                  
                                                  
                                                  Severity: Minor
                                                  Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

                                                    Function cssCounter has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                        function cssCounter() {
                                                            if (nexttoken.identifier && nexttoken.value === 'counter') {
                                                                advance();
                                                                advance('(');
                                                                if (!nexttoken.identifier) {
                                                    Severity: Minor
                                                    Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

                                                      Function parse has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                          function parse(rbp, initial) {
                                                              var left;
                                                              if (nexttoken.id === '(end)') {
                                                                  error("Unexpected early end of program.", token);
                                                              }
                                                      Severity: Minor
                                                      Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

                                                        Function varstatement has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                            function varstatement(prefix) {
                                                        
                                                        // JavaScript does not have block scope. It only has function scope. So,
                                                        // declaring a variable in a block can have unexpected consequences.
                                                        
                                                        
                                                        Severity: Minor
                                                        Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

                                                          Function assignop has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                              function assignop(s, f) {
                                                                  symbol(s, 20).exps = true;
                                                                  return infix(s, function (left, that) {
                                                                      var l;
                                                                      that.left = left;
                                                          Severity: Minor
                                                          Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

                                                            Function styleAttribute has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                                function styleAttribute() {
                                                                    var v;
                                                                    while (nexttoken.id === '*' || nexttoken.id === '#' ||
                                                                            nexttoken.value === '_') {
                                                                        if (!option.css) {
                                                            Severity: Minor
                                                            Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

                                                              Function it has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                      function it(type, value) {
                                                                          var i, t;
                                                                          if (type === '(color)') {
                                                                              t = {type: type};
                                                                          } else if (type === '(punctuator)' ||
                                                              Severity: Minor
                                                              Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

                                                                Function substyle has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                    function substyle() {
                                                                        var v;
                                                                        for (;;) {
                                                                            if (nexttoken.id === '}' || nexttoken.id === '(end)' ||
                                                                                    xquote && nexttoken.id === xquote) {
                                                                Severity: Minor
                                                                Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

                                                                  Function jsonObject has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                          function jsonObject() {
                                                                              var o = {}, t = nexttoken;
                                                                              advance('{');
                                                                              if (nexttoken.id !== '}') {
                                                                                  for (;;) {
                                                                  Severity: Minor
                                                                  Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

                                                                    Function block has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                        function block(f) {
                                                                            var a, b = inblock, old_indent = indent, s = scope, t;
                                                                            inblock = f;
                                                                            scope = Object.create(scope);
                                                                            nonadjacent(token, nexttoken);
                                                                    Severity: Minor
                                                                    Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

                                                                      Function warning has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                          function warning(m, t, a, b, c, d) {
                                                                              var ch, l, w;
                                                                              t = t || nexttoken;
                                                                              if (t.id === '(end)') {  // `~
                                                                                  t = token;
                                                                      Severity: Minor
                                                                      Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

                                                                        Function styles has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                            function styles() {
                                                                                var i;
                                                                                while (nexttoken.id === '@') {
                                                                                    i = peek();
                                                                                    if (i.identifier && i.value === 'import') {
                                                                        Severity: Minor
                                                                        Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

                                                                          Function cssUrl has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                              function cssUrl() {
                                                                                  var c, url;
                                                                                  if (nexttoken.identifier && nexttoken.value === 'url') {
                                                                                      nexttoken = lex.range('(', ')');
                                                                                      url = nexttoken.value;
                                                                          Severity: Minor
                                                                          Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

                                                                            Consider simplifying this complex logical expression.
                                                                            Open

                                                                                        if (!left.identifier && left.id !== '.' && left.id !== '[' &&
                                                                                                left.id !== '(' && left.id !== '&&' && left.id !== '||' &&
                                                                                                left.id !== '?') {
                                                                                            warning("Bad invocation.", left);
                                                                                        }
                                                                            Severity: Major
                                                                            Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

                                                                              Function warningAt has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                              Open

                                                                                  function warningAt(m, l, ch, a, b, c, d) {
                                                                              Severity: Major
                                                                              Found in lib/pre-commit/support/jslint/lint.js - About 50 mins to fix

                                                                                Function errorAt has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                Open

                                                                                    function errorAt(m, l, ch, a, b, c, d) {
                                                                                Severity: Major
                                                                                Found in lib/pre-commit/support/jslint/lint.js - About 50 mins to fix

                                                                                  Function warning has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                  Open

                                                                                      function warning(m, t, a, b, c, d) {
                                                                                  Severity: Minor
                                                                                  Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                    Avoid deeply nested control flow statements.
                                                                                    Open

                                                                                                                    if (i >= 0) {
                                                                                                                        break;
                                                                                                                    }
                                                                                    Severity: Major
                                                                                    Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                      Avoid deeply nested control flow statements.
                                                                                      Open

                                                                                                              if (nexttoken.id !== '>') {
                                                                                                                  warning("Expected '{a}' and instead saw '{b}'.",
                                                                                                                          nexttoken, '>', nexttoken.value);
                                                                                                              }
                                                                                      Severity: Major
                                                                                      Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                        Avoid deeply nested control flow statements.
                                                                                        Open

                                                                                                                if (!option.on) {
                                                                                                                    warning("Avoid HTML event handlers.");
                                                                                                                }
                                                                                        Severity: Major
                                                                                        Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                          Avoid deeply nested control flow statements.
                                                                                          Open

                                                                                                                  if (option.newcap && (i < 'A' || i > 'Z')) {
                                                                                                                      warning(
                                                                                                              "A constructor name should start with an uppercase letter.",
                                                                                                                          token);
                                                                                                                  }
                                                                                          Severity: Major
                                                                                          Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                            Avoid deeply nested control flow statements.
                                                                                            Open

                                                                                                                } else if (a === 'style') {
                                                                                                                    xmode = 'scriptstring';
                                                                                                                    advance('=');
                                                                                                                    q = nexttoken.id;
                                                                                                                    if (q !== '"' && q !== "'") {
                                                                                            Severity: Major
                                                                                            Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                              Avoid deeply nested control flow statements.
                                                                                              Open

                                                                                                                      if (option.undef) {
                                                                                                                          warning("'{a}' is not defined.", token, v);
                                                                                                                      } else {
                                                                                                                          funct[v] = true;
                                                                                                                      }
                                                                                              Severity: Major
                                                                                              Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                Avoid deeply nested control flow statements.
                                                                                                Open

                                                                                                                                if (!nextLine()) {
                                                                                                                                    errorAt("Unclosed comment.", line, character);
                                                                                                                                } else {
                                                                                                                                    if (option.safe && ax.test(s)) {
                                                                                                                                        warningAt("ADsafe comment violation.", line, character);
                                                                                                Severity: Major
                                                                                                Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                  Avoid deeply nested control flow statements.
                                                                                                  Open

                                                                                                                                  for (;;) {
                                                                                                                                      b = true;
                                                                                                                                      c = s.charAt(l);
                                                                                                                                      l += 1;
                                                                                                                                      switch (c) {
                                                                                                  Severity: Major
                                                                                                  Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                    Avoid deeply nested control flow statements.
                                                                                                    Open

                                                                                                                                    if (i >= 0) {
                                                                                                                                        errorAt("Nested HTML comment.",
                                                                                                                                            line, character + i);
                                                                                                                                    }
                                                                                                    Severity: Major
                                                                                                    Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                      Avoid deeply nested control flow statements.
                                                                                                      Open

                                                                                                                  if (option.adsafe) {
                                                                                                                      if (adsafe_id) {
                                                                                                                          if (v.slice(0, adsafe_id.length) !== adsafe_id) {
                                                                                                                              warning("ADsafe violation: An id must have a '{a}' prefix",
                                                                                                                                      nexttoken, adsafe_id);
                                                                                                      Severity: Major
                                                                                                      Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                        Function error has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                            function error(m, t, a, b, c, d) {
                                                                                                        Severity: Minor
                                                                                                        Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                          Avoid deeply nested control flow statements.
                                                                                                          Open

                                                                                                                                  switch (s[v]) {
                                                                                                                                  case 'function':
                                                                                                                                  case 'var':
                                                                                                                                  case 'unused':
                                                                                                                                      s[v] = 'closure';
                                                                                                          Severity: Major
                                                                                                          Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                            Avoid deeply nested control flow statements.
                                                                                                            Open

                                                                                                                                            if (t.length !== 4 && t.length !== 7) {
                                                                                                                                                warningAt("Bad hex color '{a}'.", line,
                                                                                                                                                    from + l, t);
                                                                                                                                            }
                                                                                                            Severity: Major
                                                                                                            Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                              Avoid deeply nested control flow statements.
                                                                                                              Open

                                                                                                                                      if (nexttoken.id === '%') {
                                                                                                                                          advance('%');
                                                                                                                                          if (number > 100) {
                                                                                                                                              warning("Expected a percentage and instead saw '{a}'",
                                                                                                                                                  token, number);
                                                                                                              Severity: Major
                                                                                                              Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                Open

                                                                                                                                    if (i <= 0) {
                                                                                                                                        error("A '<{a}>' must be within '<{b}>'.",
                                                                                                                                                token, n, 'body');
                                                                                                                                    }
                                                                                                                Severity: Major
                                                                                                                Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                  Open

                                                                                                                                          if (q !== '"' && q !== "'") {
                                                                                                                                              error("Missing quote.");
                                                                                                                                          }
                                                                                                                  Severity: Major
                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                    Open

                                                                                                                                            if (nexttoken.id === ')') {
                                                                                                                                                warning("Use the array literal notation [].", token);
                                                                                                                                            } else {
                                                                                                                                                i = parse(0);
                                                                                                                                                c.dimension = i;
                                                                                                                    Severity: Major
                                                                                                                    Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                      Open

                                                                                                                                                  if (xmode === 'html') {
                                                                                                                                                      if (option.safe) {
                                                                                                                                                          warningAt("ADsafe string violation.",
                                                                                                                                                                  line, character + j);
                                                                                                                                                      }
                                                                                                                      Severity: Major
                                                                                                                      Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                        Open

                                                                                                                                                        if (d.isDigit()) {
                                                                                                                                                            if (token.id !== '.' && xmode !== 'styleproperty') {
                                                                                                                                                                warningAt("Don't use extra leading zeros '{a}'.",
                                                                                                                                                                    line, character, t);
                                                                                                                                                            }
                                                                                                                        Severity: Major
                                                                                                                        Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                          Open

                                                                                                                                          } else if (t.value === 'maxlen' && o === '/*jslint') {
                                                                                                                                              b = +v.value;
                                                                                                                                              if (typeof b !== 'number' || !isFinite(b) || b <= 0 ||
                                                                                                                                                      Math.floor(b) !== b) {
                                                                                                                                                  error("Expected a small integer and instead saw '{a}'.",
                                                                                                                          Severity: Major
                                                                                                                          Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                            Open

                                                                                                                                                            if (i >= 0) {
                                                                                                                                                                break;
                                                                                                                                                            }
                                                                                                                            Severity: Major
                                                                                                                            Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                              Open

                                                                                                                                                              for (;;) {
                                                                                                                                                                  c = s.charAt(0);
                                                                                                                                                                  character += 1;
                                                                                                                                                                  s = s.substr(1);
                                                                                                                                                                  if (c === ';') {
                                                                                                                              Severity: Major
                                                                                                                              Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                Open

                                                                                                                                                        if (left.value === 'Math') {
                                                                                                                                                            warning("Math is not a function.", left);
                                                                                                                                                        } else if (option.newcap) {
                                                                                                                                                            warning(
                                                                                                                                "Missing 'new' prefix when invoking a constructor.", left);
                                                                                                                                Severity: Major
                                                                                                                                Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                  Open

                                                                                                                                                          if (nexttoken.id === '(end)' || nexttoken.id === '(error)') {
                                                                                                                                                              error("Missing '>'.", nexttoken);
                                                                                                                                                          }
                                                                                                                                  Severity: Major
                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                    Open

                                                                                                                                                            if (nexttoken.id !== q) {
                                                                                                                                                                error("Missing close quote on script attribute.");
                                                                                                                                                            }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                      Open

                                                                                                                                                                      if (!nextLine()) {
                                                                                                                                                                          errorAt("Unclosed HTML comment.", l, c);
                                                                                                                                                                      }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                        Open

                                                                                                                                                            if (typeof b !== 'number' || !isFinite(b) || b <= 0 ||
                                                                                                                                                                    Math.floor(b) !== b) {
                                                                                                                                                                error("Expected a small integer and instead saw '{a}'.",
                                                                                                                                                                        v, v.value);
                                                                                                                                                            }
                                                                                                                                        Severity: Major
                                                                                                                                        Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                          Open

                                                                                                                                                  } else if (a === 'name') {
                                                                                                                                                      if (option.adsafe && v.indexOf('_') >= 0) {
                                                                                                                                                          warning("ADsafe name violation.");
                                                                                                                                                      }
                                                                                                                                                  }
                                                                                                                                          Severity: Major
                                                                                                                                          Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                            Open

                                                                                                                                                                            for (;;) {
                                                                                                                                                                                c = s.charAt(0);
                                                                                                                                                                                if ((c < '0' || c > '9') &&
                                                                                                                                                                                        (c < 'a' || c > 'f') &&
                                                                                                                                                                                        (c < 'A' || c > 'F')) {
                                                                                                                                            Severity: Major
                                                                                                                                            Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                              Open

                                                                                                                                                                      if (l + n.length > 72) {
                                                                                                                                                                          o.push(m + '<br>');
                                                                                                                                                                          m = '    ';
                                                                                                                                                                          l = 1;
                                                                                                                                                                      }
                                                                                                                                              Severity: Major
                                                                                                                                              Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                Open

                                                                                                                                                                        if (nexttoken.id !== ',') {
                                                                                                                                                                            break;
                                                                                                                                                                        }
                                                                                                                                                Severity: Major
                                                                                                                                                Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                  Open

                                                                                                                                                                          if (i < a.length - 1) {
                                                                                                                                                                              n += ', ';
                                                                                                                                                                          }
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                    Open

                                                                                                                                                                            if (v === 'unused') {
                                                                                                                                                                                unused.push({
                                                                                                                                                                                    name: n,
                                                                                                                                                                                    line: f['(line)'],
                                                                                                                                                                                    'function': f['(name)']
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                      Open

                                                                                                                                                                              if (data.member[k] === 1) {
                                                                                                                                                                                  n = '<i>' + n + '</i>';
                                                                                                                                                                              }
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/jslint/lint.js - About 45 mins to fix

                                                                                                                                                        Consider simplifying this complex logical expression.
                                                                                                                                                        Open

                                                                                                                                                                                    if (!nexttoken.identifier &&
                                                                                                                                                                                            nexttoken.id !== '"' &&
                                                                                                                                                                                            nexttoken.id !== '\'' &&
                                                                                                                                                                                            nexttoken.type !== '(string)' &&
                                                                                                                                                                                            nexttoken.type !== '(number)' &&
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in lib/pre-commit/support/jslint/lint.js - About 40 mins to fix

                                                                                                                                                          Consider simplifying this complex logical expression.
                                                                                                                                                          Open

                                                                                                                                                                  } else if (a === 'href' || a === 'background' ||
                                                                                                                                                                          a === 'content' || a === 'data' ||
                                                                                                                                                                          a.indexOf('src') >= 0 || a.indexOf('url') >= 0) {
                                                                                                                                                                      if (option.safe && ux.test(v)) {
                                                                                                                                                                          error("ADsafe URL violation.");
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in lib/pre-commit/support/jslint/lint.js - About 40 mins to fix

                                                                                                                                                            Consider simplifying this complex logical expression.
                                                                                                                                                            Open

                                                                                                                                                                                                if ((c < '0' || c > '9') &&
                                                                                                                                                                                                        (c < 'a' || c > 'f') &&
                                                                                                                                                                                                        (c < 'A' || c > 'F')) {
                                                                                                                                                                                                    break;
                                                                                                                                                                                                }
                                                                                                                                                            Severity: Major
                                                                                                                                                            Found in lib/pre-commit/support/jslint/lint.js - About 40 mins to fix

                                                                                                                                                              Consider simplifying this complex logical expression.
                                                                                                                                                              Open

                                                                                                                                                                              if (nexttoken.id === '=' || nexttoken.value === '~=' ||
                                                                                                                                                                                      nexttoken.value === '$=' ||
                                                                                                                                                                                      nexttoken.value === '|=' ||
                                                                                                                                                                                      nexttoken.id === '*=' ||
                                                                                                                                                                                      nexttoken.id === '^=') {
                                                                                                                                                              Severity: Major
                                                                                                                                                              Found in lib/pre-commit/support/jslint/lint.js - About 40 mins to fix

                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                Open

                                                                                                                                                                                            return it('(number)', t);
                                                                                                                                                                Severity: Major
                                                                                                                                                                Found in lib/pre-commit/support/jslint/lint.js - About 30 mins to fix

                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                  Open

                                                                                                                                                                                                          return;
                                                                                                                                                                  Severity: Major
                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js - About 30 mins to fix

                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                    Open

                                                                                                                                                                                                    return it('(color)', t);
                                                                                                                                                                    Severity: Major
                                                                                                                                                                    Found in lib/pre-commit/support/jslint/lint.js - About 30 mins to fix

                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                      Open

                                                                                                                                                                                                              return it('(regexp)', c);
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in lib/pre-commit/support/jslint/lint.js - About 30 mins to fix

                                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                                        Open

                                                                                                                                                                                                    return it('(punctuator)', t);
                                                                                                                                                                        Severity: Major
                                                                                                                                                                        Found in lib/pre-commit/support/jslint/lint.js - About 30 mins to fix

                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                          Open

                                                                                                                                                                                                      return it('(punctuator)', t);
                                                                                                                                                                          Severity: Major
                                                                                                                                                                          Found in lib/pre-commit/support/jslint/lint.js - About 30 mins to fix

                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                            Open

                                                                                                                                                                                            return match;
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in lib/pre-commit/support/jslint/lint.js - About 30 mins to fix

                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                              Open

                                                                                                                                                                                                              return it('(regexp)', c);
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in lib/pre-commit/support/jslint/lint.js - About 30 mins to fix

                                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                                Open

                                                                                                                                                                                                            return it('(punctuator)', t);
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/pre-commit/support/jslint/lint.js - About 30 mins to fix

                                                                                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                      relation('!=', function (left, right) {
                                                                                                                                                                                          if (option.eqeqeq) {
                                                                                                                                                                                              warning("Expected '{a}' and instead saw '{b}'.",
                                                                                                                                                                                                      this, '!==', '!=');
                                                                                                                                                                                          } else if (isPoorRelation(left)) {
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 4062..4074

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 91.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                      relation('==', function (left, right) {
                                                                                                                                                                                          if (option.eqeqeq) {
                                                                                                                                                                                              warning("Expected '{a}' and instead saw '{b}'.",
                                                                                                                                                                                                      this, '===', '==');
                                                                                                                                                                                          } else if (isPoorRelation(left)) {
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 4076..4088

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 91.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                          if (nexttoken.id !== ';') {
                                                                                                                                                                                              if (token.line === nexttoken.line) {
                                                                                                                                                                                                  if (funct[v] !== 'label') {
                                                                                                                                                                                                      warning("'{a}' is not a statement label.", nexttoken, v);
                                                                                                                                                                                                  } else if (scope[v] !== funct) {
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 4966..4978

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 89.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                          if (nexttoken.id !== ';') {
                                                                                                                                                                                              if (token.line === nexttoken.line) {
                                                                                                                                                                                                  if (funct[v] !== 'label') {
                                                                                                                                                                                                      warning("'{a}' is not a statement label.", nexttoken, v);
                                                                                                                                                                                                  } else if (scope[v] !== funct) {
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 4944..4954

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 89.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                                  } else if (t.value === 'maxerr' && o === '/*jslint') {
                                                                                                                                                                                                      b = +v.value;
                                                                                                                                                                                                      if (typeof b !== 'number' || !isFinite(b) || b <= 0 ||
                                                                                                                                                                                                              Math.floor(b) !== b) {
                                                                                                                                                                                                          error("Expected a small integer and instead saw '{a}'.",
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 1882..1896

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 88.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                                  } else if (t.value === 'maxlen' && o === '/*jslint') {
                                                                                                                                                                                                      b = +v.value;
                                                                                                                                                                                                      if (typeof b !== 'number' || !isFinite(b) || b <= 0 ||
                                                                                                                                                                                                              Math.floor(b) !== b) {
                                                                                                                                                                                                          error("Expected a small integer and instead saw '{a}'.",
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 1874..1896

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 88.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                                              if (!nexttoken.identifier &&
                                                                                                                                                                                                                      nexttoken.id !== '"' &&
                                                                                                                                                                                                                      nexttoken.id !== '\'' &&
                                                                                                                                                                                                                      nexttoken.type !== '(string)' &&
                                                                                                                                                                                                                      nexttoken.type !== '(number)' &&
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 4352..4353

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 67.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                              if (!left.identifier && left.id !== '.' && left.id !== '[' &&
                                                                                                                                                                                                      left.id !== '(' && left.id !== '&&' && left.id !== '||' &&
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 3797..3802

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 67.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                                                              for (;;) {
                                                                                                                                                                                                                                  c = s.charAt(l);
                                                                                                                                                                                                                                  if (c < '0' || c > '9') {
                                                                                                                                                                                                                                      break;
                                                                                                                                                                                                                                  }
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 1674..1681

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 64.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                                                                      for (;;) {
                                                                                                                                                                                                                                          c = s.charAt(l);
                                                                                                                                                                                                                                          if (c < '0' || c > '9') {
                                                                                                                                                                                                                                              break;
                                                                                                                                                                                                                                          }
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 1658..1665

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 64.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                                  if (adsafe_id) {
                                                                                                                                                                                                      if (v.slice(0, adsafe_id.length) !== adsafe_id) {
                                                                                                                                                                                                          warning("ADsafe violation: An id must have a '{a}' prefix",
                                                                                                                                                                                                                  nexttoken, adsafe_id);
                                                                                                                                                                                                      } else if (!/^[A-Z]+_[A-Z]+$/.test(v)) {
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 3549..3558

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 62.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                                  if (adsafe_id) {
                                                                                                                                                                                                      if (v.slice(0, adsafe_id.length) !== adsafe_id) {
                                                                                                                                                                                                          warning("ADsafe violation: An id must have a '{a}' prefix",
                                                                                                                                                                                                                  nexttoken, adsafe_id);
                                                                                                                                                                                                      } else if (!/^[A-Z]+_[A-Z]+$/.test(v)) {
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 3515..3527

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 62.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                                                                  if (xmode === 'script') {
                                                                                                                                                                                                                                      c = s.charAt(l);
                                                                                                                                                                                                                                      if (c === '!' || c === '/') {
                                                                                                                                                                                                                                          warningAt("HTML confusion in regular expression '<{a}'.", line, from + l, c);
                                                                                                                                                                                                                                      }
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 1633..1638

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 59.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                                                          if (xmode === 'script') {
                                                                                                                                                                                                                              c = s.charAt(l);
                                                                                                                                                                                                                              if (c === '!' || c === '/') {
                                                                                                                                                                                                                                  warningAt("HTML confusion in regular expression '<{a}'.", line, from + l, c);
                                                                                                                                                                                                                              }
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 1606..1611

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 59.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                              if (nexttoken.id === ',') {
                                                                                                                                                                                                  comma();
                                                                                                                                                                                                  if (nexttoken.type !== '(string)') {
                                                                                                                                                                                                      warning("Expected a string and instead saw '{a}'.",
                                                                                                                                                                                                          nexttoken, nexttoken.value);
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 2849..2856
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 2857..2864

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 55.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                              if (nexttoken.id === ',') {
                                                                                                                                                                                                  comma();
                                                                                                                                                                                                  if (nexttoken.type !== '(string)') {
                                                                                                                                                                                                      warning("Expected a string and instead saw '{a}'.",
                                                                                                                                                                                                          nexttoken, nexttoken.value);
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 2830..2837
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 2849..2856

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 55.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                              if (nexttoken.id === ',') {
                                                                                                                                                                                                  comma();
                                                                                                                                                                                                  if (nexttoken.type !== '(string)') {
                                                                                                                                                                                                      warning("Expected a string and instead saw '{a}'.",
                                                                                                                                                                                                          nexttoken, nexttoken.value);
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 2830..2837
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 2857..2864

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 55.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                          if (b) {
                                                                                                                                                                                              indent += option.indent;
                                                                                                                                                                                              if (nexttoken.from === indent + option.indent) {
                                                                                                                                                                                                  indent += option.indent;
                                                                                                                                                                                              }
                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 4456..4461

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 52.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                              if (b) {
                                                                                                                                                                                                  indent += option.indent;
                                                                                                                                                                                                  if (nexttoken.from === indent + option.indent) {
                                                                                                                                                                                                      indent += option.indent;
                                                                                                                                                                                                  }
                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 4416..4421

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 52.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                                                                  if (c < ' ') {
                                                                                                                                                                                                                                      warningAt("Unexpected control character in regular expression.", line, from + l);
                                                                                                                                                                                                                                  } else if (c === '<') {
                                                                                                                                                                                                                                      warningAt("Unexpected escaped character '{a}' in regular expression.", line, from + l, c);
                                                                                                                                                                                                                                  }
                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 45 mins to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 1511..1515

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 50.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                                                          if (c < ' ') {
                                                                                                                                                                                                                              warningAt("Unexpected control character in regular expression.", line, from + l);
                                                                                                                                                                                                                          } else if (c === '<') {
                                                                                                                                                                                                                              warningAt("Unexpected escaped character '{a}' in regular expression.", line, from + l, c);
                                                                                                                                                                                                                          }
                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 45 mins to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 1593..1597

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 50.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                              if (left.character !== right.from && left.line === right.line) {
                                                                                                                                                                                                  warning("Unexpected space after '{a}'.", right, left.value);
                                                                                                                                                                                              }
                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 2076..2079

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 48.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                              if (left.line === right.line && left.character === right.from) {
                                                                                                                                                                                                  warning("Missing space after '{a}'.",
                                                                                                                                                                                                          nexttoken, left.value);
                                                                                                                                                                                              }
                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 2055..2057

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 48.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                                  if (nexttoken.id === ';' || nexttoken.id === '!'  ||
                                                                                                                                                                                                          nexttoken.id === '(end)' || nexttoken.id === '}') {
                                                                                                                                                                                                      return true;
                                                                                                                                                                                                  }
                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 4303..4312

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 46.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                                      if (left.value !== 'Number' && left.value !== 'String' &&
                                                                                                                                                                                                              left.value !== 'Boolean' &&
                                                                                                                                                                                                              left.value !== 'Date') {
                                                                                                                                                                                                          if (left.value === 'Math') {
                                                                                                                                                                                                              warning("Math is not a function.", left);
                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                  Found in lib/pre-commit/support/jslint/lint.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                  lib/pre-commit/support/jslint/lint.js on lines 2935..2938

                                                                                                                                                                                  Duplicated Code

                                                                                                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                  Tuning

                                                                                                                                                                                  This issue has a mass of 46.

                                                                                                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                  Refactorings

                                                                                                                                                                                  Further Reading

                                                                                                                                                                                  There are no issues that match your filters.

                                                                                                                                                                                  Category
                                                                                                                                                                                  Status