Showing 463 of 531 total issues

Function JSLINT has a Cognitive Complexity of 2546 (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 tools/jslint.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 JSLINT has a Cognitive Complexity of 2546 (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 tools/jslint/fulljslint.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 JSLINT has 5047 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 tools/jslint/fulljslint.js - About 3 wks to fix

    Function JSLINT has 5047 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 tools/jslint.js - About 3 wks to fix

      File 01-jquery.js has 6570 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*!
       * jQuery JavaScript Library v1.9.1
       * http://jquery.com/
       *
       * Includes Sizzle.js
      Severity: Major
      Found in static/script/01-jquery.js - About 2 wks to fix

        File jslint.js has 5086 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // jslint.js
        // 2010-11-18
        
        /*
        Copyright (c) 2002 Douglas Crockford  (www.JSLint.com)
        Severity: Major
        Found in tools/jslint.js - About 2 wks to fix

          File fulljslint.js has 5050 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // jslint.js
          // 2010-11-18
          
          /*
          Copyright (c) 2002 Douglas Crockford  (www.JSLint.com)
          Severity: Major
          Found in tools/jslint/fulljslint.js - About 2 wks to fix

            Function initCore has 857 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                History.initCore = function(options){
                    // Initialise
                    if ( typeof History.initCore.initialized !== 'undefined' ) {
                        // Already Loaded
                        return false;
            Severity: Major
            Found in static/script/02-history.js - About 4 days to fix

              File 01-jquery.fancybox.js has 1456 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*!
               * fancyBox - jQuery Plugin
               * version: 2.1.5 (Fri, 14 Jun 2013)
               * @requires jQuery v1.6 or later
               *
              Severity: Major
              Found in plugins/misc/fancybox/script/01-jquery.fancybox.js - About 3 days to fix

                Function lex has 689 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 tools/jslint.js - About 3 days to fix

                  Function lex has 689 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 tools/jslint/fulljslint.js - About 3 days to fix

                    Function token has 583 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 tools/jslint.js - About 2 days to fix

                      Function token has 583 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 tools/jslint/fulljslint.js - About 2 days to fix

                        File 02-history.js has 901 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /**
                         * History.js Core
                         * @author Benjamin Arthur Lupton <contact@balupton.com>
                         * @copyright 2010-2011 Benjamin Arthur Lupton <contact@balupton.com>
                         * @license New BSD License <http://creativecommons.org/licenses/BSD/>
                        Severity: Major
                        Found in static/script/02-history.js - About 2 days to fix

                          Function ajax has 241 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              ajax: function( url, options ) {
                          
                                  // If url is an object, simulate pre-1.5 signature
                                  if ( typeof url === "object" ) {
                                      options = url;
                          Severity: Major
                          Found in static/script/01-jquery.js - About 1 day to fix

                            Function setDocument has 230 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            setDocument = Sizzle.setDocument = function( node ) {
                                var doc = node ? node.ownerDocument || node : preferredDoc;
                            
                                // If no document and documentElement is available, return
                                if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
                            Severity: Major
                            Found in static/script/01-jquery.js - About 1 day to fix

                              Function _create has 197 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  _create: function() {
                                      // Some browsers only repeat keydown events, not keypress events,
                                      // so we use the suppressKeyPress flag to determine if we've already
                                      // handled the keydown event. #7269
                                      // Unfortunately the code for & in keypress is the same as the up arrow,
                              Severity: Major
                              Found in static/script/08-jquery.ui.autocomplete.js - About 7 hrs 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 tools/jslint.js - About 7 hrs 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 tools/jslint/fulljslint.js - About 7 hrs to fix

                                    File 07-jquery.ui.menu.js has 488 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    /*!
                                     * jQuery UI Menu 1.10.3
                                     * http://jqueryui.com
                                     *
                                     * Copyright 2013 jQuery Foundation and other contributors
                                    Severity: Minor
                                    Found in static/script/07-jquery.ui.menu.js - About 7 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language