skyglobal/web-toolkit

View on GitHub

Showing 325 of 729 total issues

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

/*!
 * jQuery JavaScript Library v1.10.2
 * http://jquery.com/
 *
 * Includes Sizzle.js
Severity: Major
Found in app/static/lib/jquery-1.10.2.js - About 2 wks to fix

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

    /*!
     * jQuery JavaScript Library v2.0.3
     * http://jquery.com/
     *
     * Includes Sizzle.js
    Severity: Major
    Found in app/static/lib/jquery-2.0.3.js - About 2 wks to fix

      File testandtarget.js has 1049 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      var mboxCopyright = "Copyright 1996-2012. Adobe Systems Incorporated. All rights reserved.";
      mboxUrlBuilder = function (a, b) {
          this.a = a;
          this.b = b;
          this.c = new Array();
      Severity: Major
      Found in app/static/lib/testandtarget.js - About 2 days to fix

        File backbone-1.1.2.js has 956 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        //     Backbone.js 1.1.2
        
        //     (c) 2010-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
        //     Backbone may be freely distributed under the MIT license.
        //     For all details and documentation:
        Severity: Major
        Found in app/static/lib/backbone-1.1.2.js - About 2 days to fix

          File underscore-1.6.0.js has 931 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          //     Underscore.js 1.6.0
          //     http://underscorejs.org
          //     (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
          //     Underscore may be freely distributed under the MIT license.
          
          
          Severity: Major
          Found in app/static/lib/underscore-1.6.0.js - About 2 days to fix

            Function carousel has a Cognitive Complexity of 102 (exceeds 5 allowed). Consider refactoring.
            Open

            toolkit.carousel = (function(video, detect) {
                'use strict';
            
                var has3d = detect.css('translate3d');
                var hasTransform = detect.css('transform');
            Severity: Minor
            Found in app/src/js/toolkit/components/carousel.js - About 2 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 carousel has 408 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            toolkit.carousel = (function(video, detect) {
                'use strict';
            
                var has3d = detect.css('translate3d');
                var hasTransform = detect.css('transform');
            Severity: Major
            Found in app/src/js/toolkit/components/carousel.js - About 2 days to fix

              Function ajax has 240 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 app/static/lib/jquery-1.10.2.js - About 1 day to fix

                Function ajax has 240 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 app/static/lib/jquery-2.0.3.js - About 1 day to fix

                  Function toggle has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
                  Open

                  toolkit.toggle = (function(detect, event) {
                  
                      var hasResized = false,
                          hasContentChanged = false,
                          elementsToToggle = {},
                  Severity: Minor
                  Found in app/src/js/toolkit/utils/toggle.js - About 1 day 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 setDocument has 200 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  setDocument = Sizzle.setDocument = function( node ) {
                      var doc = node ? node.ownerDocument || node : preferredDoc,
                          parent = doc.defaultView;
                  
                      // If no document and documentElement is available, return
                  Severity: Major
                  Found in app/static/lib/jquery-1.10.2.js - About 1 day to fix

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

                    setDocument = Sizzle.setDocument = function( node ) {
                        var doc = node ? node.ownerDocument || node : preferredDoc,
                            parent = doc.defaultView;
                    
                        // If no document and documentElement is available, return
                    Severity: Major
                    Found in app/static/lib/jquery-2.0.3.js - About 1 day to fix

                      Function validation has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
                      Open

                      toolkit.validation = (function () {
                          "use strict";
                      
                          function isSafari() {
                              var ua = navigator.userAgent.toLowerCase();
                      Severity: Minor
                      Found in app/src/js/toolkit/utils/validation.js - About 7 hrs 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 inPageNav has 189 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      toolkit.inPageNav = (function(hash, event) {
                      //    todo: accessibility check when moving tabs about - perhaps dont have 2 separate lists.
                      //    todo: move 'more' link to outside the ul
                      
                          function InPageNav($element){
                      Severity: Major
                      Found in app/src/js/toolkit/components/in-page-nav.js - About 7 hrs to fix

                        Function lightbox has 185 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        toolkit.lightbox = (function ($, keyboardFocus, hash, event, detect) {
                            "use strict";
                            var scrollbarWidth,
                                classes = {
                                    main: 'lightbox',
                        Severity: Major
                        Found in app/src/js/toolkit/components/lightbox.js - About 7 hrs to fix

                          Function diff has 184 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          changes.diff = (function(hljs){
                          
                              function findFiles(opts){
                                  var oldRoute = opts.oldRoute,
                                      newRoute = opts.newRoute;
                          Severity: Major
                          Found in app/src/js/changes/diff.js - About 7 hrs to fix

                            Function diff has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
                            Open

                            changes.diff = (function(hljs){
                            
                                function findFiles(opts){
                                    var oldRoute = opts.oldRoute,
                                        newRoute = opts.newRoute;
                            Severity: Minor
                            Found in app/src/js/changes/diff.js - About 6 hrs 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 datePicker has 153 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            toolkit.datePicker = (function () {
                            
                                var monthNames=["", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ],
                                    currentDate = {
                                        day: new Date().getDate(),
                            Severity: Major
                            Found in app/src/js/toolkit/components/date-picker.js - About 6 hrs to fix

                              File carousel.js has 419 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /*global toolit define*/
                              if (typeof toolkit==='undefined') { toolkit={}; }
                              toolkit.carousel = (function(video, detect) {
                                  'use strict';
                              
                              
                              Severity: Minor
                              Found in app/src/js/toolkit/components/carousel.js - About 6 hrs to fix

                                Function validation has 148 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                toolkit.validation = (function () {
                                    "use strict";
                                
                                    function isSafari() {
                                        var ua = navigator.userAgent.toLowerCase();
                                Severity: Major
                                Found in app/src/js/toolkit/utils/validation.js - About 5 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language