jish/pre-commit

View on GitHub

Showing 171 of 259 total issues

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

            function substyle() {
                var v;
                for (;;) {
                    if (nexttoken.id === '}' || nexttoken.id === '(end)' ||
                            xquote && nexttoken.id === xquote) {
        Severity: Minor
        Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

          Function _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 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 jsonObject has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function jsonObject() {
                          var o = {}, t = nexttoken;
                          advance('{');
                          if (nexttoken.id !== '}') {
                              for (;;) {
              Severity: Minor
              Found in lib/pre-commit/support/jslint/lint.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 _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 _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 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 block has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function block(f) {
                                    var a, b = inblock, old_indent = indent, s = scope, t;
                                    inblock = f;
                                    scope = Object.create(scope);
                                    nonadjacent(token, nexttoken);
                            Severity: Minor
                            Found in lib/pre-commit/support/jslint/lint.js - About 1 hr to fix

                              Method to_s has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def to_s
                                    result = message.to_s
                                    unless empty? file
                                      result = "#{result}#{"\n" unless empty?(result)}#{file}"
                                      result = "#{result}:#{line}" unless empty? line
                              Severity: Minor
                              Found in lib/pre-commit/line.rb - About 1 hr 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 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 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 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 _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 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
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language