bronycub/sugarcub

View on GitHub

Showing 1,331 of 3,238 total issues

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

QUnit.jsDump = (function() {
    function quote( str ) {
        return '"' + str.toString().replace(/"/g, '\\"') + '"';
    };
    function literal( o ) {
Severity: Major
Found in core/static/vendor/jquery-expander/test/qunit/qunit.js - About 5 hrs to fix

    Function test has 144 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        test: function(testName, expected, callback, async) {
            var name = '<span class="test-name">' + testName + '</span>', testEnvironment, testEnvironmentArg;
    
            if ( arguments.length === 2 ) {
                callback = expected;
    Severity: Major
    Found in core/static/vendor/jquery-expander/test/qunit/qunit.js - About 5 hrs to fix

      Function xdsoftScroller has 140 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $.fn.xdsoftScroller = function (percent) {
              return this.each(function () {
                  var timeboxparent = $(this),
                      pointerEventToXY = function (e) {
                          var out = {x: 0, y: 0},
      Severity: Major
      Found in core/static/vendor/datetimepicker/jquery.datetimepicker.js - About 5 hrs to fix

        Function xdsoftScroller has 140 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            $.fn.xdsoftScroller = function (percent) {
                return this.each(function () {
                    var timeboxparent = $(this),
                        pointerEventToXY = function (e) {
                            var out = {x: 0, y: 0},
        Severity: Major
        Found in core/static/vendor/datetimepicker/build/jquery.datetimepicker.full.js - About 5 hrs to fix

          Function callbacks has 140 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  callbacks = (function() {
          
                      // for string, boolean, number and null
                      function useStrictEquality( b, a ) {
          
          
          Severity: Major
          Found in core/static/vendor/jquery-expander/test/qunit/qunit.1.19.0.js - About 5 hrs to fix

            Function transform has 136 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function transform(slider) {
            
              var isValueSet, areAttrsSet, isChanged, isClick, prevValue, rawValue, prevX;
              var min, max, step, range, value = slider.value;
            
            
            Severity: Major
            Found in core/static/vendor/css-social-buttons/site/html5slider.js - About 5 hrs to fix

              Function parseDate has 129 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      parseDate: function (vDate, vFormat) {
                          var self = this, vFormatParts, vDateParts, i, vDateFlag = false, vTimeFlag = false, vDatePart, iDatePart,
                              vSettings = self.dateSettings, vMonth, vMeriIndex, vMeriOffset, len, mer,
                              out = {date: null, year: null, month: null, day: null, hour: 0, min: 0, sec: 0};
                          if (!vDate) {
              Severity: Major
              Found in core/static/vendor/php-date-formatter/js/php-date-formatter.js - About 5 hrs to fix

                Function parseDate has 129 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        parseDate: function(date, format, language, assumeNearby){
                            if (!date)
                                return undefined;
                            if (date instanceof Date)
                                return date;
                Severity: Major
                Found in core/static/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js - About 5 hrs to fix

                  Function parseDate has 129 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          parseDate: function(date, format, language, assumeNearby){
                              if (!date)
                                  return undefined;
                              if (date instanceof Date)
                                  return date;

                    Function Callbacks has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    jQuery.Callbacks = function( options ) {
                    
                      // Convert options from String-formatted to Object-formatted if needed
                      // (we check in cache first)
                      options = typeof options === "string" ?
                    Severity: Major
                    Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js - About 5 hrs to fix

                      File tooltip.js has 380 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /* ========================================================================
                       * Bootstrap: tooltip.js v3.3.7
                       * http://getbootstrap.com/javascript/#tooltip
                       * Inspired by the original jQuery.tipsy by Jason Frame
                       * ========================================================================
                      Severity: Minor
                      Found in core/static/vendor/bootstrap/js/tooltip.js - About 5 hrs to fix

                        Function parseFormat has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                parseFormat: function (vChar, vDate) {
                                    var self = this, vSettings = self.dateSettings, fmt, backslash = /\\?(.?)/gi, doFormat = function (t, s) {
                                        return fmt[t] ? fmt[t]() : s;
                                    };
                                    fmt = {
                        Severity: Major
                        Found in core/static/vendor/php-date-formatter/js/php-date-formatter.js - About 5 hrs to fix

                          Function parseFormat has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  parseFormat: function (vChar, vDate) {
                                      var self = this, vSettings = self.dateSettings, fmt, backspace = /\\?(.?)/gi, doFormat = function (t, s) {
                                          return fmt[t] ? fmt[t]() : s;
                                      };
                                      fmt = {
                          Severity: Major
                          Found in core/static/vendor/datetimepicker/build/jquery.datetimepicker.full.js - About 5 hrs to fix

                            Function equiv has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            QUnit.equiv = (function() {
                            
                                var innerEquiv; // the real equiv function
                                var callers = []; // stack to decide between skip/abort functions
                                var parents = []; // stack to avoiding loops from circular referencing
                            Severity: Major
                            Found in core/static/vendor/bootstrap-datepicker/tests/assets/qunit.js - About 5 hrs to fix

                              Consider simplifying this complex logical expression.
                              Open

                                    if ( event.pageX == null && original.clientX != null ) {
                                      eventDoc = event.target.ownerDocument || document;
                                      doc = eventDoc.documentElement;
                                      body = eventDoc.body;
                              
                              
                              Severity: Critical
                              Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js - About 5 hrs to fix

                                File tests.js has 372 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                /*global module:false, test:false, equal:false, ok:false, asyncTest:false,start:false, expect: false */
                                
                                /* SINGLE BLOCK BASICS */
                                module('single block', {
                                  setup: function() {
                                Severity: Minor
                                Found in core/static/vendor/jquery-expander/test/tests.js - About 4 hrs to fix

                                  Function configFromISO has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  export function configFromISO(config) {
                                      var i, l,
                                          string = config._i,
                                          match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
                                          allowTime, dateFormat, timeFormat, tzFormat;
                                  Severity: Minor
                                  Found in core/static/vendor/moment/src/lib/create/from-string.js - About 4 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 defaultPrefilter has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function defaultPrefilter( elem, props, opts ) {
                                      var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
                                          isBox = "width" in props || "height" in props,
                                          anim = this,
                                          orig = {},
                                  Severity: Major
                                  Found in core/static/vendor/jquery/dist/jquery.js - About 4 hrs to fix

                                    Function defaultPrefilter has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function defaultPrefilter( elem, props, opts ) {
                                        var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
                                            isBox = "width" in props || "height" in props,
                                            anim = this,
                                            orig = {},
                                    Severity: Major
                                    Found in core/static/vendor/jquery/src/effects.js - About 4 hrs to fix

                                      Function Callbacks has 121 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      jQuery.Callbacks = function( options ) {
                                      
                                          // Convert options from String-formatted to Object-formatted if needed
                                          // (we check in cache first)
                                          options = typeof options === "string" ?
                                      Severity: Major
                                      Found in core/static/vendor/jquery/dist/jquery.js - About 4 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language