bronycub/sugarcub

View on GitHub

Showing 1,331 of 3,238 total issues

File sizzle.js has 1467 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * Sizzle CSS Selector Engine v2.3.3
 * https://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
Severity: Major
Found in core/static/vendor/jquery/external/sizzle/dist/sizzle.js - About 3 days to fix

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

    QUnit.diff = ( function() {
        function DiffMatchPatch() {
        }
    
        //  DIFF FUNCTIONS
    Severity: Major
    Found in core/static/vendor/jquery-expander/test/qunit/qunit.1.19.0.js - About 3 days to fix

      File qunit.js has 1320 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
       * QUnit v1.5.0 - A JavaScript Unit Testing Framework
       *
       * http://docs.jquery.com/QUnit
       *
      Severity: Major
      Found in core/static/vendor/bootstrap-datepicker/tests/assets/qunit.js - About 3 days to fix

        File options.js has 1206 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        module('Options', {
            setup: function(){},
            teardown: function(){
                $('#qunit-fixture *').each(function(){
                    var t = $(this);
        Severity: Major
        Found in core/static/vendor/bootstrap-datepicker/tests/suites/options.js - About 3 days to fix

          File qunit.js has 964 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*
           * QUnit - A JavaScript Unit Testing Framework
           * 
           * http://docs.jquery.com/QUnit
           *
          Severity: Major
          Found in core/static/vendor/jquery-expander/test/qunit/qunit.js - About 2 days to fix

            Function exports has 428 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            module.exports = function (grunt) {
              'use strict';
            
              // Force use of Unix newlines
              grunt.util.linefeed = '\n';
            Severity: Major
            Found in core/static/vendor/bootstrap/Gruntfile.js - About 2 days to fix

              Function processRelativeTime has a Cognitive Complexity of 96 (exceeds 5 allowed). Consider refactoring.
              Open

              function processRelativeTime(number, withoutSuffix, key, isFuture) {
                  var result = number + ' ';
                  switch (key) {
                      case 's':
                          return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';
              Severity: Minor
              Found in core/static/vendor/moment/src/locale/sl.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 expander has 284 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                $.fn.expander = function(options) {
                  var meth = 'init';
              
                  if (typeof options === 'string') {
                    meth = options;
              Severity: Major
              Found in core/static/vendor/jquery-expander/jquery.expander.js - About 1 day to fix

                Function ajax has 251 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 core/static/vendor/jquery/dist/jquery.js - About 1 day to fix

                  Function ajax has 251 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 core/static/vendor/jquery/src/ajax.js - About 1 day to fix

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

                    setDocument = Sizzle.setDocument = function( node ) {
                        var hasCompare, subWindow,
                            doc = node ? node.ownerDocument || node : preferredDoc;
                    
                        // Return early if doc is invalid or already selected
                    Severity: Major
                    Found in core/static/vendor/jquery/dist/jquery.js - About 1 day to fix

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

                      setDocument = Sizzle.setDocument = function( node ) {
                          var hasCompare, subWindow,
                              doc = node ? node.ownerDocument || node : preferredDoc;
                      
                          // Return early if doc is invalid or already selected
                      Severity: Major
                      Found in core/static/vendor/jquery/dist/jquery.slim.js - About 1 day to fix

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

                        setDocument = Sizzle.setDocument = function( node ) {
                            var hasCompare, subWindow,
                                doc = node ? node.ownerDocument || node : preferredDoc;
                        
                            // Return early if doc is invalid or already selected
                        Severity: Major
                        Found in core/static/vendor/jquery/external/sizzle/dist/sizzle.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 core/static/vendor/jquery-expander/test/jquery.1.11.3.js - About 1 day to fix

                            Function exports has 232 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            module.exports = function(grunt){
                                'use strict';
                            
                                // Force use of Unix newlines
                                grunt.util.linefeed = '\n';
                            Severity: Major
                            Found in core/static/vendor/bootstrap-datepicker/Gruntfile.js - About 1 day to fix

                              Function translate has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function translate(number, withoutSuffix, key, isFuture) {
                                  var result = number + ' ';
                                  switch (key) {
                                      case 's':
                                          return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';
                              Severity: Minor
                              Found in core/static/vendor/moment/src/locale/is.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

                              File effects.js has 535 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              define( [
                                  "./core",
                                  "./var/document",
                                  "./var/rcssNum",
                                  "./var/rnothtmlwhite",
                              Severity: Major
                              Found in core/static/vendor/jquery/src/effects.js - About 1 day to fix

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

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

                                  File event.js has 519 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  define( [
                                      "./core",
                                      "./var/document",
                                      "./var/documentElement",
                                      "./var/rnothtmlwhite",
                                  Severity: Major
                                  Found in core/static/vendor/jquery/src/event.js - About 1 day to fix

                                    Function dump has 210 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    QUnit.dump = (function() {
                                        function quote( str ) {
                                            return "\"" + str.toString().replace( /\\/g, "\\\\" ).replace( /"/g, "\\\"" ) + "\"";
                                        }
                                        function literal( o ) {
                                    Severity: Major
                                    Found in core/static/vendor/jquery-expander/test/qunit/qunit.1.19.0.js - About 1 day to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language