jish/pre-commit

View on GitHub

Showing 259 of 259 total issues

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

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

                          if (properties[needed][0].pos < properties[actual][0].pos){
                              reporter.report("Standard property '" + needed + "' should come after vendor-prefixed property '" + actual + "'.", properties[actual][0].name.line, properties[actual][0].name.col, rule);
                          }
      Severity: Major
      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 1 hr to fix
      lib/pre-commit/support/csslint/csslint.js on lines 8714..8721

      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 66.

      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 (!properties[needed]){
                          reporter.report("Missing standard property '" + needed + "' to go along with '" + actual + "'.", properties[actual][0].name.line, properties[actual][0].name.col, rule);
                      } else {
                          //make sure standard property is last
                          if (properties[needed][0].pos < properties[actual][0].pos){
      Severity: Major
      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 1 hr to fix
      lib/pre-commit/support/csslint/csslint.js on lines 8718..8720

      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 66.

      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

      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 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 init has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              init: function(parser, reporter){
                  var rule = this,
                      classes = {};
          
                  parser.addListener("startrule", function(event){
          Severity: Minor
          Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

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

                                    function(){
                                        return tokenStream.match(Tokens.HASH) ?
                                                new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) :
                                                null;
                                    },
            Severity: Major
            Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 1 hr to fix
            lib/pre-commit/support/csslint/csslint.js on lines 2310..2314

            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 65.

            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

                            case ".":
                                if (isDigit(reader.peek())){
                                    token = this.numberToken(c, startLine, startCol);
                                } else {
                                    token = this.charToken(c, startLine, startCol);
            Severity: Major
            Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 1 hr to fix
            lib/pre-commit/support/csslint/csslint.js on lines 4771..4777

            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 65.

            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

                            case "#":
                                if (isNameChar(reader.peek())){
                                    token = this.hashToken(c, startLine, startCol);
                                } else {
                                    token = this.charToken(c, startLine, startCol);
            Severity: Major
            Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 1 hr to fix
            lib/pre-commit/support/csslint/csslint.js on lines 4786..4792

            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 65.

            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

                                    function(){
                                        return tokenStream.match(Tokens.HASH) ?
                                                new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) :
                                                null;
                                    },
            Severity: Major
            Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 1 hr to fix
            lib/pre-commit/support/csslint/csslint.js on lines 2685..2689

            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 65.

            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

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

                        _keyframes: function(){
            
                            /*
                             * keyframes:
                             *   : KEYFRAMES_SYM S* keyframe_name S* '{' S* keyframe_rule* '}' {
            Severity: Minor
            Found in lib/pre-commit/support/csslint/csslint.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 multiProperty has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    multiProperty: function (types, expression, comma, max) {
                
                        var result      = false,
                            value       = expression.value,
                            count       = 0,
                Severity: Minor
                Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

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

                      importantToken: function(first, startLine, startCol){
                          var reader      = this._reader,
                              important   = first,
                              tt          = Tokens.CHAR,
                              temp,
                  Severity: Minor
                  Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

                    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

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

                                _negation_arg: function(){
                                    /*
                                     * negation_arg
                                     *   : type_selector | universal | HASH | class | attrib | pseudo
                                     *   ;
                    Severity: Minor
                    Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

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

                          groupProperty: function (types, expression, comma) {
                      
                              var result      = false,
                                  value       = expression.value,
                                  typeCount   = types.split("||").length,
                      Severity: Minor
                      Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

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

                            init: function(parser, reporter){
                                var rule = this,
                                    gradients;
                        
                                parser.addListener("startrule", function(){
                        Severity: Minor
                        Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language