jish/pre-commit

View on GitHub

Showing 259 of 259 total issues

Function updateValues has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function updateValues(part){

        var i, j, len, num,
            elementName = part.elementName ? part.elementName.text : "",
            modifier;
Severity: Minor
Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

    Function validate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        validate: function(property, value){
    
            //normalize name
            var name        = property.toString().toLowerCase(),
                parts       = value.parts,
    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

                      case "/":
      
                          if(reader.peek() == "*"){
                              token = this.commentToken(c, startLine, startCol);
                          } else {
      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 4748..4754

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

      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

      function SyntaxError(message, line, col){
      
          /**
           * The column at which the error occurred.
           * @type int
      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 6017..6040

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

      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

      function ValidationError(message, line, col){
      
          /**
           * The column at which the error occurred.
           * @type int
      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 418..441

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

      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(reader.peek() == "="){
                              token = this.comparisonToken(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 4726..4733

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

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

                  _attrib: function(){
                      /*
                       * attrib
                       *   : '[' S* [ namespace_prefix ]? IDENT S*
                       *         [ [ PREFIXMATCH |
      Severity: Minor
      Found in lib/pre-commit/support/csslint/csslint.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 endRule has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function endRule(){
          
                      var display = properties.display ? properties.display.value : null;
                      if (display){
                          switch(display){
          Severity: Minor
          Found in lib/pre-commit/support/csslint/csslint.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 border-radius has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  "border-radius"                 : function(expression) {
              
                      var valid   = false,
                          simple = "<length> | <percentage> | inherit",
                          slash   = false,
              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

                    commentToken: function(first, startLine, startCol){
                        var reader  = this._reader,
                            comment = this.readComment(first);
                
                        return this.createToken(Tokens.COMMENT, comment, 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 5069..5074

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

                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

                    hashToken: function(first, startLine, startCol){
                        var reader  = this._reader,
                            name    = this.readName(first);
                
                        return this.createToken(Tokens.HASH, name, 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 5034..5039

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

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

                            _namespace: function(emit){
                                /*
                                 * namespace
                                 *   : NAMESPACE_SYM S* [namespace_prefix S*]? [STRING|URI] S* ';' S*
                                 */
                Severity: Minor
                Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

                  Function unicodeRangeToken has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

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

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

                      Function formatResults has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          formatResults: function(results, filename, options) {
                              var messages = results.messages,
                                  output = "";
                              options = options || {};
                      
                      
                      Severity: Minor
                      Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

                        Function <shadow></shadow> has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                "<shadow>": function(expression) {
                                    //inset? && [ <length>{2,4} && <color>? ]
                                    var result  = false,
                                        count   = 0,
                                        inset   = false,
                        Severity: Minor
                        Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

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

                              readURI: function(first){
                                  var reader  = this._reader,
                                      uri     = first,
                                      inner   = "",
                                      c       = reader.peek();
                          Severity: Minor
                          Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

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

                                numberToken: function(first, startLine, startCol){
                                    var reader  = this._reader,
                                        value   = this.readNumber(first),
                                        ident,
                                        tt      = Tokens.NUMBER,
                            Severity: Minor
                            Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language