jish/pre-commit

View on GitHub

Showing 171 of 259 total issues

Function JSLINT has a Cognitive Complexity of 2493 (exceeds 5 allowed). Consider refactoring.
Open

var JSLINT = (function () {
    var adsafe_id,      // The widget's ADsafe id.
        adsafe_may,     // The widget may load approved scripts.
        adsafe_went,    // ADSAFE.go has been called.
        anonname,       // The guessed name for anonymous functions.
Severity: Minor
Found in lib/pre-commit/support/jslint/lint.js - About 1 mo 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 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

    Function JSLINT has 4801 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var JSLINT = (function () {
        var adsafe_id,      // The widget's ADsafe id.
            adsafe_may,     // The widget may load approved scripts.
            adsafe_went,    // ADSAFE.go has been called.
            anonname,       // The guessed name for anonymous functions.
    Severity: Major
    Found in lib/pre-commit/support/jslint/lint.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

        File lint.js has 4804 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // jslint.js
        // 2010-02-20
        
        /*
        Copyright (c) 2002 Douglas Crockford  (www.JSLint.com)
        Severity: Major
        Found in lib/pre-commit/support/jslint/lint.js - About 1 wk 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 lex has 662 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var lex = (function lex() {
                    var character, from, line, s;
            
            // Private lex methods
            
            
            Severity: Major
            Found in lib/pre-commit/support/jslint/lint.js - About 3 days to fix

              Function token has 556 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          token: function () {
                              var b, c, captures, d, depth, high, i, l, low, q, t;
              
                              function match(x) {
                                  var r = x.exec(s), r1;
              Severity: Major
              Found in lib/pre-commit/support/jslint/lint.js - About 2 days to fix

                Function html has 195 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function html() {
                        var a, attributes, e, n, q, t, v, w = option.white, wmode;
                        xmode = 'html';
                        xquote = '';
                        stack = null;
                Severity: Major
                Found in lib/pre-commit/support/jslint/lint.js - About 7 hrs to fix

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

                        var itself = function (s, o) {
                            var a, i;
                            JSLINT.errors = [];
                            predefined = Object.create(standard);
                            if (o) {
                    Severity: Major
                    Found in lib/pre-commit/support/jslint/lint.js - About 5 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 doTag has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function doTag(n, a) {
                                var i, t = htmltag[n], x;
                                src = false;
                                if (!t) {
                                    error("Unrecognized tag '<{a}>'.",
                        Severity: Major
                        Found in lib/pre-commit/support/jslint/lint.js - About 4 hrs to fix

                          Function styleSelector has 114 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function styleSelector() {
                                  if (nexttoken.identifier) {
                                      if (!is_own(htmltag, nexttoken.value)) {
                                          warning("Expected a tagName, and instead saw {a}.",
                                              nexttoken, nexttoken.value);
                          Severity: Major
                          Found in lib/pre-commit/support/jslint/lint.js - About 4 hrs to fix

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

                            var CSSLint = (function(){
                            
                                var rules           = [],
                                    formatters      = [],
                                    embeddedRuleset = /\/\*csslint([^\*]*)\*\//,
                            Severity: Major
                            Found in lib/pre-commit/support/csslint/csslint.js - About 4 hrs to fix

                              Function string has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                              function string(x) {
                                                  var c, j, r = '';
                              
                                                  if (jsonmode && x !== '"') {
                                                      warningAt("Strings must use doublequote.",
                              Severity: Major
                              Found in lib/pre-commit/support/jslint/lint.js - About 4 hrs to fix

                                Function report has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    itself.report = function (option) {
                                        var data = itself.data();
                                
                                        var a = [], c, e, err, f, i, k, l, m = '', n, o = [], s;
                                
                                
                                Severity: Major
                                Found in lib/pre-commit/support/jslint/lint.js - About 4 hrs to fix

                                  Function _stylesheet has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

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

                                    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
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language