Showing 531 of 531 total issues

Identical blocks of code found in 2 locations. 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 and 1 other location - About 8 mos to fix
tools/jslint.js on lines 264..5786

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

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

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 and 1 other location - About 8 mos to fix
tools/jslint/fulljslint.js on lines 264..5786

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function 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

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

                          (function(a) {
                              var input="";
                              var line="";
                              var blankcount="0";
                              while (blankcount < 10){
                          Severity: Major
                          Found in tools/jslint.js and 1 other location - About 1 day to fix
                          tools/jslint/spidermonkey.js on lines 1..38

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

                          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(a) {
                              var input="";
                              var line="";
                              var blankcount="0";
                              while (blankcount < 10){
                          Severity: Major
                          Found in tools/jslint/spidermonkey.js and 1 other location - About 1 day to fix
                          tools/jslint.js on lines 5787..5824

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

                          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

                                      History.pushState = function(data,title,url,queue){
                                          //History.debug('History.pushState: called', arguments);
                          
                                          // Check the State
                                          if ( History.getHashByUrl(url) && History.emulated.pushState ) {
                          Severity: Major
                          Found in static/script/02-history.js and 1 other location - About 1 day to fix
                          static/script/02-history.js on lines 1832..1878

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

                          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

                                      History.replaceState = function(data,title,url,queue){
                                          //History.debug('History.replaceState: called', arguments);
                          
                                          // Check the State
                                          if ( History.getHashByUrl(url) && History.emulated.pushState ) {
                          Severity: Major
                          Found in static/script/02-history.js and 1 other location - About 1 day to fix
                          static/script/02-history.js on lines 1775..1821

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

                          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

                          Severity
                          Category
                          Status
                          Source
                          Language