jish/pre-commit

View on GitHub

Showing 259 of 259 total issues

Function PropertyValuePart has 121 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function PropertyValuePart(text, line, col){

    SyntaxUnit.call(this, text, line, col, Parser.PROPERTY_VALUE_PART_TYPE);

    /**
Severity: Major
Found in lib/pre-commit/support/csslint/csslint.js - About 4 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 CSSLint has 113 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var CSSLint = (function(){
        
            var rules           = [],
                formatters      = [],
                embeddedRuleset = /\/\*csslint([^\*]*)\*\//,
        Severity: Major
        Found in lib/pre-commit/support/csslint/csslint.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 _stylesheet has 105 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          _stylesheet: function(){
              
                              /*
                               * stylesheet
                               *  : [ CHARSET_SYM S* STRING S* ';' ]?
              Severity: Major
              Found in lib/pre-commit/support/csslint/csslint.js - About 4 hrs to fix

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

                                } else if (ValidationTypes.isAny(expression, yDir)) {
                                    if (ValidationTypes.isAny(expression, xDir)) {
                                        result = true;
                                        ValidationTypes.isAny(expression, numeric);
                                    } else if (ValidationTypes.isAny(expression, numeric)) {
                Severity: Major
                Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 4 hrs to fix
                lib/pre-commit/support/csslint/csslint.js on lines 6269..6298

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

                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 (ValidationTypes.isAny(expression, xDir)) {
                                    if (ValidationTypes.isAny(expression, yDir)) {
                                        result = true;
                                        ValidationTypes.isAny(expression, numeric);
                                    } else if (ValidationTypes.isAny(expression, numeric)) {
                Severity: Major
                Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 4 hrs to fix
                lib/pre-commit/support/csslint/csslint.js on lines 6281..6298

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

                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

                    htmlCommentStartToken: function(first, startLine, startCol){
                        var reader      = this._reader,
                            text        = first;
                
                        reader.mark();
                Severity: Major
                Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 3 hrs to fix
                lib/pre-commit/support/csslint/csslint.js on lines 5111..5124

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

                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

                    htmlCommentEndToken: function(first, startLine, startCol){
                        var reader      = this._reader,
                            text        = first;
                
                        reader.mark();
                Severity: Major
                Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 3 hrs to fix
                lib/pre-commit/support/csslint/csslint.js on lines 5086..5099

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

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

                    init: function(parser, reporter){
                        var rule = this,
                            properties,
                            num,
                            propertiesToCheck = {
                Severity: Major
                Found in lib/pre-commit/support/csslint/csslint.js - About 3 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 _getToken has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _getToken: function(channel){
                    
                            var c,
                                reader = this._reader,
                                token   = null,
                    Severity: Major
                    Found in lib/pre-commit/support/csslint/csslint.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 init has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

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

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

                                  init: function(parser, reporter){
                                      var rule = this,
                                          widthProperties = {
                                              border: 1,
                                              "border-left": 1,
                              Severity: Major
                              Found in lib/pre-commit/support/csslint/csslint.js - About 2 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
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language