jish/pre-commit

View on GitHub

Showing 259 of 259 total issues

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

    init: function(parser, reporter){
        var rule = this,
            lastProperty,
            propertiesToCheck = {
                color: 1,
Severity: Major
Found in lib/pre-commit/support/csslint/csslint.js - About 2 hrs to fix

    Function _simple_selector_sequence has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                _simple_selector_sequence: function(){
                    /*
                     * simple_selector_sequence
                     *   : [ type_selector | universal ]
                     *     [ HASH | class | attrib | pseudo | negation ]*
    Severity: Major
    Found in lib/pre-commit/support/csslint/csslint.js - About 2 hrs to fix

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

          init: function(parser, reporter){
              var rule = this,
                  prop, i, len,
                  propertiesToCheck = {},
                  properties,
      Severity: Major
      Found in lib/pre-commit/support/csslint/csslint.js - About 2 hrs to fix

        Function _term has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    _term: function(){
        
                        /*
                         * term
                         *   : unary_operator?
        Severity: Major
        Found in lib/pre-commit/support/csslint/csslint.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 init has 48 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                init: function(parser, reporter){
                    var rule = this;
            
                    var headings =  {
                            h1: 0,
            Severity: Minor
            Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

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

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

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

                    get: function(channel){
                
                        var tokenInfo   = this._tokenData,
                            reader      = this._reader,
                            value,
                Severity: Minor
                Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr 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 _selector has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  _selector: function(){
                                      /*
                                       * selector
                                       *   : simple_selector_sequence [ combinator simple_selector_sequence ]*
                                       *   ;
                      Severity: Minor
                      Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

                        Function verify has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            api.verify = function(text, ruleset){
                        
                                var i       = 0,
                                    len     = rules.length,
                                    reporter,
                        Severity: Minor
                        Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

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

                          Specificity.calculate = function(selector){
                          
                              var i, len,
                                  part,
                                  b=0, c=0, d=0;
                          Severity: Minor
                          Found in lib/pre-commit/support/csslint/csslint.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 _readDeclarations has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          _readDeclarations: function(checkStart, readMargins){
                                              /*
                                               * Reads the pattern
                                               * S* '{' S* declaration [ ';' S* declaration ]* '}' S*
                                               * or
                              Severity: Minor
                              Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

                                Function _ruleset has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                            _ruleset: function(){
                                                /*
                                                 * ruleset
                                                 *   : selectors_group
                                                 *     '{' S* declaration? [ ';' S* declaration? ]* '}' S*
                                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

                                                              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

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

                                              _declaration: function(){
                                  
                                                  /*
                                                   * declaration
                                                   *   : property ':' S* expr prio?
                                  Severity: Minor
                                  Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

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

                                                _media_query: function(){
                                                    /*
                                                     * media_query
                                                     *   : [ONLY | NOT]? S* media_type S* [ AND S* expression ]*
                                                     *   | expression [ AND S* expression ]*
                                    Severity: Minor
                                    Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language