jish/pre-commit

View on GitHub
lib/pre-commit/support/csslint/csslint.js

Summary

Maintainability
F
3 mos
Test Coverage

Function CSSLint has 5384 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var CSSLint = (function(){
/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.

Severity: Major
Found in lib/pre-commit/support/csslint/csslint.js - About 3 wks to fix

    File csslint.js has 5387 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
    CSSLint
    Copyright (c) 2013 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
    
    Permission is hereby granted, free of charge, to any person obtaining a copy
    Severity: Major
    Found in lib/pre-commit/support/csslint/csslint.js - About 2 wks to fix

      Function prototype has 1270 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Parser.prototype = function(){
      
          var proto = new EventTarget(),  //new prototype
              prop,
              additions =  {
      Severity: Major
      Found in lib/pre-commit/support/csslint/csslint.js - About 6 days to fix

        Function CSSLint has a Cognitive Complexity of 247 (exceeds 5 allowed). Consider refactoring.
        Open

        var CSSLint = (function(){
        /*!
        Parser-Lib
        Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
        
        
        Severity: Minor
        Found in lib/pre-commit/support/csslint/csslint.js - About 5 days 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 init has 152 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          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 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 _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

                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 _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 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 <bg-position></bg-position> has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                "<bg-position>": function(expression){
                                    var types   = this,
                                        result  = false,
                                        numeric = "<percentage> | <length>",
                                        xDir    = "left | right",
                        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 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 _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 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 _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 _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

                                                  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

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

                                                        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

                                                          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 _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 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

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

                                                                                _function: function(){
                                                                    
                                                                                    /*
                                                                                     * function
                                                                                     *   : FUNCTION S* expr ')' S*
                                                                    Severity: Minor
                                                                    Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

                                                                      Function _page has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                                  _page: function(){
                                                                                      /*
                                                                                       * page:
                                                                                       *    PAGE_SYM S* IDENT? pseudo_page? S*
                                                                                       *    '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S*
                                                                      Severity: Minor
                                                                      Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

                                                                        Function _media has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                                    _media: function(){
                                                                                        /*
                                                                                         * media
                                                                                         *   : MEDIA_SYM S* media_query_list S* '{' S* ruleset* '}' S*
                                                                                         *   ;
                                                                        Severity: Minor
                                                                        Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

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

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

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

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

                                                                              Function border-image-slice has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                                  "border-image-slice"            : function(expression) {
                                                                              
                                                                                      var valid   = false,
                                                                                          numeric = "<number> | <percentage>",
                                                                                          fill    = false,
                                                                              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

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

                                                                                              _ie_function: function(){
                                                                                  
                                                                                                  /* (My own extension)
                                                                                                   * ie_function
                                                                                                   *   : IE_FUNCTION S* IDENT '=' term [S* ','? IDENT '=' term]+ ')' S*
                                                                                  Severity: Minor
                                                                                  Found in lib/pre-commit/support/csslint/csslint.js - About 1 hr to fix

                                                                                    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 init has 29 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 _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 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 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

                                                                                              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 _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 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

                                                                                                        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

                                                                                                            Avoid deeply nested control flow statements.
                                                                                                            Open

                                                                                                                                        if (modifier.type == "class"){
                                                                                                                                            classCount++;
                                                                                                                                        }
                                                                                                            Severity: Major
                                                                                                            Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                              Avoid deeply nested control flow statements.
                                                                                                              Open

                                                                                                                                          if (part.elementName && modifier.type == "id"){
                                                                                                                                              reporter.report("Element (" + part + ") is overqualified, just use " + modifier + " without element name.", part.line, part.col, rule);
                                                                                                                                          } else if (modifier.type == "class"){
                                                                                                              
                                                                                                                                              if (!classes[modifier]){
                                                                                                              Severity: Major
                                                                                                              Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                Open

                                                                                                                                            if (modifier.type == "id"){
                                                                                                                                                idCount++;
                                                                                                                                            }
                                                                                                                Severity: Major
                                                                                                                Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                  Open

                                                                                                                                              if (CSSLint.Util.indexOf(propertyGroups[prop].actual, name.text) === -1) {
                                                                                                                                                  propertyGroups[prop].actual.push(name.text);
                                                                                                                                                  propertyGroups[prop].actualNodes.push(name);
                                                                                                                                              }
                                                                                                                  Severity: Major
                                                                                                                  Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                    Open

                                                                                                                                                if (/([^\)]+)\(/.test(parts[i])){
                                                                                                                                                    colorType = RegExp.$1.toUpperCase();
                                                                                                                                                }
                                                                                                                    Severity: Major
                                                                                                                    Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                      Open

                                                                                                                                              if (ValidationTypes.isAny(expression, xDir)) {
                                                                                                                                                      result = true;
                                                                                                                                                      ValidationTypes.isAny(expression, numeric);
                                                                                                                                              } else if (ValidationTypes.isAny(expression, "center")) {
                                                                                                                                                  result = true;
                                                                                                                      Severity: Major
                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                        Open

                                                                                                                                                    if (!propertyGroups[prop]) {
                                                                                                                                                        propertyGroups[prop] = {
                                                                                                                                                            full : variations.slice(0),
                                                                                                                                                            actual : [],
                                                                                                                                                            actualNodes: []
                                                                                                                        Severity: Major
                                                                                                                        Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                          Open

                                                                                                                                                      if (modifier.type == "attribute"){
                                                                                                                                                          if (/([\~\|\^\$\*]=)/.test(modifier)){
                                                                                                                                                              reporter.report("Attribute selectors with " + RegExp.$1 + " are slow!", modifier.line, modifier.col, rule);
                                                                                                                                                          }
                                                                                                                                                      }
                                                                                                                          Severity: Major
                                                                                                                          Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                            Open

                                                                                                                                                            if (combinator !== null){
                                                                                                                                                                selector.push(combinator);
                                                                                                                                                            } else {
                                                                                                                                                                selector.push(ws);
                                                                                                                                                            }
                                                                                                                            Severity: Major
                                                                                                                            Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                              Open

                                                                                                                                                          if (!lastProperty || (lastProperty.property.text.toLowerCase() != name || lastProperty.colorType != "compat")){
                                                                                                                                                              reporter.report("Fallback " + name + " (hex or RGB) should precede " + colorType + " " + name + ".", event.line, event.col, rule);
                                                                                                                                                          }
                                                                                                                              Severity: Major
                                                                                                                              Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                Open

                                                                                                                                                        if (temp.length == 1){
                                                                                                                                                            reader.reset();
                                                                                                                                                        } else {
                                                                                                                                                            value += temp;
                                                                                                                                                        }
                                                                                                                                Severity: Major
                                                                                                                                Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                  Open

                                                                                                                                                              if (!(prop == "padding" && value.parts.length === 2 && value.parts[0].value === 0)){
                                                                                                                                                                  reporter.report("Using height with " + prop + " can sometimes make elements larger than you expect.", properties[prop].line, properties[prop].col, rule);
                                                                                                                                                              }
                                                                                                                                  Severity: Major
                                                                                                                                  Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                    Open

                                                                                                                                                                if (!(prop == "padding" && value.parts.length === 2 && value.parts[1].value === 0)){
                                                                                                                                                                    reporter.report("Using width with " + prop + " can sometimes make elements larger than you expect.", properties[prop].line, properties[prop].col, rule);
                                                                                                                                                                }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                      Open

                                                                                                                                                                      if (combinator !== null){
                                                                                                                                                                          this._unexpectedToken(tokenStream.LT(1));
                                                                                                                                                                      }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                        Open

                                                                                                                                                                    if (CSSLint.Util.indexOf(actual, item) === -1) {
                                                                                                                                                                        propertiesSpecified = (actual.length === 1) ? actual[0] : (actual.length == 2) ? actual.join(" and ") : actual.join(", ");
                                                                                                                                                                        reporter.report("The property " + item + " is compatible with " + propertiesSpecified + " and should be included as well.", value.actualNodes[0].line, value.actualNodes[0].col, rule);
                                                                                                                                                                    }
                                                                                                                                        Severity: Major
                                                                                                                                        Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                          Open

                                                                                                                                                                      if (tokenStream.LA(3) == Tokens.EQUALS && this.options.ieFilters){
                                                                                                                                                                          value = this._ie_function();
                                                                                                                                                                      } else {
                                                                                                                                                                          value = this._function();
                                                                                                                                                                      }
                                                                                                                                          Severity: Major
                                                                                                                                          Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                            Open

                                                                                                                                                                if (ValidationTypes.isAny(expression, xDir + " | " + yDir)) {
                                                                                                                                                                    result = true;
                                                                                                                                                                    ValidationTypes.isAny(expression, numeric);
                                                                                                                                                                }
                                                                                                                                            Severity: Major
                                                                                                                                            Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                              Open

                                                                                                                                                                          if (classCount > 1){
                                                                                                                                                                              reporter.report("Don't use adjoining classes.", part.line, part.col, rule);
                                                                                                                                                                          }
                                                                                                                                              Severity: Major
                                                                                                                                              Found in lib/pre-commit/support/csslint/csslint.js - About 45 mins to fix

                                                                                                                                                Function MediaQuery has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                Open

                                                                                                                                                function MediaQuery(modifier, mediaType, features, line, col){
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in lib/pre-commit/support/csslint/csslint.js - About 35 mins to fix

                                                                                                                                                  Function createToken has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                  Open

                                                                                                                                                      createToken: function(tt, value, startLine, startCol, options){
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in lib/pre-commit/support/csslint/csslint.js - About 35 mins to fix

                                                                                                                                                    Function SelectorPart has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                    function SelectorPart(elementName, modifiers, text, line, col){
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in lib/pre-commit/support/csslint/csslint.js - About 35 mins to fix

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

                                                                                                                                                      CSSLint.addFormatter({
                                                                                                                                                          //format information
                                                                                                                                                          id: "csslint-xml",
                                                                                                                                                          name: "CSSLint XML format",
                                                                                                                                                      
                                                                                                                                                      
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 2 days to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 9126..9193

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

                                                                                                                                                      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

                                                                                                                                                      CSSLint.addFormatter({
                                                                                                                                                          //format information
                                                                                                                                                          id: "lint-xml",
                                                                                                                                                          name: "Lint XML format",
                                                                                                                                                      
                                                                                                                                                      
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 2 days to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 8953..9019

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

                                                                                                                                                      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

                                                                                                                                                                              do {
                                                                                                                                                      
                                                                                                                                                                                  if (this._readWhitespace()){
                                                                                                                                                                                      functionText += tokenStream.token().value;
                                                                                                                                                                                  }
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 1 day to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3021..3045

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

                                                                                                                                                      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

                                                                                                                                                                          do {
                                                                                                                                                      
                                                                                                                                                                              if (this._readWhitespace()){
                                                                                                                                                                                  functionText += tokenStream.token().value;
                                                                                                                                                                              }
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 1 day to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 2967..2991

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

                                                                                                                                                      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

                                                                                                                                                      CSSLint.addRule({
                                                                                                                                                      
                                                                                                                                                          //rule information
                                                                                                                                                          id: "selector-max",
                                                                                                                                                          name: "Error when past the 4095 selector limit for IE",
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 5 hrs to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 8209..8232

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

                                                                                                                                                      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

                                                                                                                                                      CSSLint.addRule({
                                                                                                                                                      
                                                                                                                                                          //rule information
                                                                                                                                                          id: "selector-max-approaching",
                                                                                                                                                          name: "Warn when approaching the 4095 selector limit for IE",
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 5 hrs to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 8238..8261

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

                                                                                                                                                      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

                                                                                                                                                      CSSLint.addRule({
                                                                                                                                                      
                                                                                                                                                          //rule information
                                                                                                                                                          id: "star-property-hack",
                                                                                                                                                          name: "Disallow properties with a star prefix",
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 5 hrs to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 8434..8455

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

                                                                                                                                                      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

                                                                                                                                                      CSSLint.addRule({
                                                                                                                                                      
                                                                                                                                                          //rule information
                                                                                                                                                          id: "underscore-property-hack",
                                                                                                                                                          name: "Disallow properties with an underscore prefix",
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 5 hrs to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 8354..8375

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

                                                                                                                                                      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

                                                                                                                                                                      } 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

                                                                                                                                                          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

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

                                                                                                                                                                  parseRule: function(input){
                                                                                                                                                                      this._tokenStream = new TokenStream(input, Tokens);
                                                                                                                                                      
                                                                                                                                                                      //skip any leading white space
                                                                                                                                                                      this._readWhitespace();
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 2 hrs to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3482..3499

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

                                                                                                                                                      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

                                                                                                                                                                  parseSelector: function(input){
                                                                                                                                                      
                                                                                                                                                                      this._tokenStream = new TokenStream(input, Tokens);
                                                                                                                                                      
                                                                                                                                                                      //skip any leading white space
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 2 hrs to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3457..3473

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

                                                                                                                                                      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 3 locations. Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                              if (expression.hasNext()) {
                                                                                                                                                                  part = expression.next();
                                                                                                                                                                  if (valid) {
                                                                                                                                                                      throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
                                                                                                                                                                  } else {
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 2 other locations - About 2 hrs to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3669..3676
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3709..3716

                                                                                                                                                      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 3 locations. Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                              if (expression.hasNext()) {
                                                                                                                                                                  part = expression.next();
                                                                                                                                                                  if (valid) {
                                                                                                                                                                      throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
                                                                                                                                                                  } else {
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 2 other locations - About 2 hrs to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3599..3606
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3669..3676

                                                                                                                                                      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 3 locations. Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                              if (expression.hasNext()) {
                                                                                                                                                                  part = expression.next();
                                                                                                                                                                  if (valid) {
                                                                                                                                                                      throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
                                                                                                                                                                  } else {
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 2 other locations - About 2 hrs to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3599..3606
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3709..3716

                                                                                                                                                      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

                                                                                                                                                                      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

                                                                                                                                                      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

                                                                                                                                                      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

                                                                                                                                                      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

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

                                                                                                                                                              parser.addListener("endstylesheet", function(){
                                                                                                                                                                  reporter.stat("important", count);
                                                                                                                                                                  if (count >= 10){
                                                                                                                                                                      reporter.rollupWarn("Too many !important declarations (" + count + "), try to use less than 10 to avoid specificity issues.", rule);
                                                                                                                                                                  }
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 2 other locations - About 1 hr to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 7681..7686
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 7746..7751

                                                                                                                                                      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

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

                                                                                                                                                              parser.addListener("endstylesheet", function(){
                                                                                                                                                                  reporter.stat("font-sizes", count);
                                                                                                                                                                  if (count >= 10){
                                                                                                                                                                      reporter.rollupWarn("Too many font-size declarations (" + count + "), abstraction needed.", rule);
                                                                                                                                                                  }
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 2 other locations - About 1 hr to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 7681..7686
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 7921..7926

                                                                                                                                                      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

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

                                                                                                                                                              parser.addListener("endstylesheet", function(){
                                                                                                                                                                  reporter.stat("floats", count);
                                                                                                                                                                  if (count >= 10){
                                                                                                                                                                      reporter.rollupWarn("Too many floats (" + count + "), you're probably using them for layout. Consider using a grid system instead.", rule);
                                                                                                                                                                  }
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 2 other locations - About 1 hr to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 7746..7751
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 7921..7926

                                                                                                                                                      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

                                                                                                                                                      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

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

                                                                                                                                                          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

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

                                                                                                                                                              if (!result) {
                                                                                                                                                                  if (expression.hasNext() && !expression.isFirst()) {
                                                                                                                                                                      part = expression.peek();
                                                                                                                                                                      throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
                                                                                                                                                                  } else {
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 2 other locations - About 55 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 5941..5957
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 5992..6002

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

                                                                                                                                                      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

                                                                                                                                                              var generateSource = function(rule) {
                                                                                                                                                                  if (!rule || !('name' in rule)) {
                                                                                                                                                                      return "";
                                                                                                                                                                  }
                                                                                                                                                                  return 'net.csslint.' + rule.name.replace(/\s/g,'');
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 55 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 8867..8872

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

                                                                                                                                                      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 (!result) {
                                                                                                                                                                  if (partial && expression.hasNext()) {
                                                                                                                                                                          part = expression.peek();
                                                                                                                                                                          throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
                                                                                                                                                                  } else {
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 2 other locations - About 55 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 5900..5910
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 5941..5957

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

                                                                                                                                                      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

                                                                                                                                                                  var generateSource = function(rule) {
                                                                                                                                                                      if (!rule || !('name' in rule)) {
                                                                                                                                                                          return "";
                                                                                                                                                                      }
                                                                                                                                                                      return 'net.csslint.' + rule.name.replace(/\s/g,'');
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 55 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 9065..9070

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

                                                                                                                                                      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 (!result) {
                                                                                                                                                                  if (expression.hasNext() && !expression.isFirst()) {
                                                                                                                                                                      part = expression.peek();
                                                                                                                                                                      throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
                                                                                                                                                                  } else {
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 2 other locations - About 55 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 5900..5910
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 5992..6002

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

                                                                                                                                                      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

                                                                                                                                                                              this.fire({
                                                                                                                                                                                  type:       "error",
                                                                                                                                                                                  error:      ex,
                                                                                                                                                                                  message:    ex.message,
                                                                                                                                                                                  line:       ex.line,
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 55 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 2131..2137

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

                                                                                                                                                      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

                                                                                                                                                              while (expression.hasNext() && count < max) {
                                                                                                                                                                  result = ValidationTypes.isAny(expression, types);
                                                                                                                                                                  if (!result) {
                                                                                                                                                                      break;
                                                                                                                                                                  }
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 55 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3654..3660

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

                                                                                                                                                      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

                                                                                                                                                                              this.fire({
                                                                                                                                                                                  type:       "error",
                                                                                                                                                                                  error:      ex,
                                                                                                                                                                                  message:    ex.message,
                                                                                                                                                                                  line:       ex.line,
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 55 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3323..3329

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

                                                                                                                                                      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

                                                                                                                                                              while (expression.hasNext() && count < max) {
                                                                                                                                                                  valid = ValidationTypes.isAny(expression, numeric);
                                                                                                                                                                  if (!valid) {
                                                                                                                                                                      break;
                                                                                                                                                                  }
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 55 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 5892..5898

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

                                                                                                                                                      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 3 locations. Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                                                              case Tokens.IMPORT_SYM:
                                                                                                                                                                                                  token = tokenStream.LT(1);
                                                                                                                                                                                                  this._import(false);
                                                                                                                                                                                                  throw new SyntaxError("@import not allowed here.", token.startLine, token.startCol);
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 2 other locations - About 50 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 1422..1425
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 1430..1433

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

                                                                                                                                                      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 3 locations. Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                                                              case Tokens.NAMESPACE_SYM:
                                                                                                                                                                                                  token = tokenStream.LT(1);
                                                                                                                                                                                                  this._namespace(false);
                                                                                                                                                                                                  throw new SyntaxError("@namespace not allowed here.", token.startLine, token.startCol);
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 2 other locations - About 50 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 1422..1425
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 1426..1429

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

                                                                                                                                                      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 3 locations. Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                                                              case Tokens.CHARSET_SYM:
                                                                                                                                                                                                  token = tokenStream.LT(1);
                                                                                                                                                                                                  this._charset(false);
                                                                                                                                                                                                  throw new SyntaxError("@charset not allowed here.", token.startLine, token.startCol);
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 2 other locations - About 50 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 1426..1429
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 1430..1433

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

                                                                                                                                                      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

                                                                                                                                                          rollupWarn: function(message, rule){
                                                                                                                                                              this.messages.push({
                                                                                                                                                                  type    : "warning",
                                                                                                                                                                  rollup  : true,
                                                                                                                                                                  message : message,
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 45 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 6795..6802

                                                                                                                                                      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

                                                                                                                                                          rollupError: function(message, rule){
                                                                                                                                                              this.messages.push({
                                                                                                                                                                  type    : "error",
                                                                                                                                                                  rollup  : true,
                                                                                                                                                                  message : message,
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 45 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 6810..6817

                                                                                                                                                      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 (unary !== null){
                                                                                                                                                                          line = tokenStream.token().startLine;
                                                                                                                                                                          col = tokenStream.token().startCol;
                                                                                                                                                                      }
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 40 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 2883..2886

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

                                                                                                                                                      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 (unary === null){
                                                                                                                                                                              line = tokenStream.token().startLine;
                                                                                                                                                                              col = tokenStream.token().startCol;
                                                                                                                                                                          }
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 40 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 2874..2877

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

                                                                                                                                                      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 4 locations. Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                                      this.fire({
                                                                                                                                                                          type:   "endkeyframerule",
                                                                                                                                                                          keys:   keyList,
                                                                                                                                                                          line:   keyList[0].line,
                                                                                                                                                                          col:    keyList[0].col
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 3 other locations - About 40 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 2160..2165
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 2169..2174
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3172..3177

                                                                                                                                                      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 4 locations. Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                                      this.fire({
                                                                                                                                                                          type:   "startkeyframerule",
                                                                                                                                                                          keys:   keyList,
                                                                                                                                                                          line:   keyList[0].line,
                                                                                                                                                                          col:    keyList[0].col
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 3 other locations - About 40 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 2160..2165
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 2169..2174
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3181..3186

                                                                                                                                                      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 4 locations. Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                                          this.fire({
                                                                                                                                                                              type:       "startrule",
                                                                                                                                                                              selectors:  selectors,
                                                                                                                                                                              line:       selectors[0].line,
                                                                                                                                                                              col:        selectors[0].col
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 3 other locations - About 40 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 2169..2174
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3172..3177
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3181..3186

                                                                                                                                                      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 4 locations. Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                                          this.fire({
                                                                                                                                                                              type:       "endrule",
                                                                                                                                                                              selectors:  selectors,
                                                                                                                                                                              line:       selectors[0].line,
                                                                                                                                                                              col:        selectors[0].col
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 3 other locations - About 40 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 2160..2165
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3172..3177
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3181..3186

                                                                                                                                                      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

                                                                                                                                                                      while (tokenStream.peek() == Tokens.IMPORT_SYM){
                                                                                                                                                                          this._import();
                                                                                                                                                                          this._skipCruft();
                                                                                                                                                                      }
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 35 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 1351..1354

                                                                                                                                                      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

                                                                                                                                                                      while (tokenStream.peek() == Tokens.NAMESPACE_SYM){
                                                                                                                                                                          this._namespace();
                                                                                                                                                                          this._skipCruft();
                                                                                                                                                                      }
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 1 other location - About 35 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 1345..1348

                                                                                                                                                      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 3 locations. Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                                          this.fire({
                                                                                                                                                                              type:   "import",
                                                                                                                                                                              uri:    uri,
                                                                                                                                                                              media:  mediaList,
                                                                                                                                                                              line:   importToken.startLine,
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 2 other locations - About 30 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3114..3120
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3132..3138

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

                                                                                                                                                      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 3 locations. Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                                      this.fire({
                                                                                                                                                                          type:   "endkeyframes",
                                                                                                                                                                          name:   name,
                                                                                                                                                                          prefix: prefix,
                                                                                                                                                                          line:   token.startLine,
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 2 other locations - About 30 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 1528..1534
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3114..3120

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

                                                                                                                                                      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 3 locations. Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                                      this.fire({
                                                                                                                                                                          type:   "startkeyframes",
                                                                                                                                                                          name:   name,
                                                                                                                                                                          prefix: prefix,
                                                                                                                                                                          line:   token.startLine,
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in lib/pre-commit/support/csslint/csslint.js and 2 other locations - About 30 mins to fix
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 1528..1534
                                                                                                                                                      lib/pre-commit/support/csslint/csslint.js on lines 3132..3138

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

                                                                                                                                                      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