bronycub/sugarcub

View on GitHub

Showing 3,238 of 3,238 total issues

Function handleStrictParse has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function handleStrictParse(monthName, format, strict) {
    var i, ii, mom, llc = monthName.toLocaleLowerCase();
    if (!this._monthsParse) {
        // this is not used
        this._monthsParse = [];
Severity: Minor
Found in core/static/vendor/moment/src/lib/units/month.js - About 1 hr to fix

    Function handleStrictParse has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function handleStrictParse(monthName, format, strict) {
        var i, ii, mom, llc = monthName.toLocaleLowerCase();
        if (!this._monthsParse) {
            // this is not used
            this._monthsParse = [];
    Severity: Minor
    Found in core/static/vendor/moment/moment.js - About 1 hr to fix

      Function defineLocale has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function defineLocale (name, config) {
          if (config !== null) {
              var parentConfig = baseConfig;
              config.abbr = name;
              if (locales[name] != null) {
      Severity: Minor
      Found in core/static/vendor/moment/min/moment-with-locales.js - About 1 hr to fix

        Function defineLocale has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function defineLocale (name, config) {
            if (config !== null) {
                var parentConfig = baseConfig;
                config.abbr = name;
                if (locales[name] != null) {
        Severity: Minor
        Found in core/static/vendor/moment/moment.js - About 1 hr to fix

          Function handleStrictParse has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function handleStrictParse(monthName, format, strict) {
              var i, ii, mom, llc = monthName.toLocaleLowerCase();
              if (!this._monthsParse) {
                  // this is not used
                  this._monthsParse = [];
          Severity: Minor
          Found in core/static/vendor/moment/min/moment-with-locales.js - About 1 hr to fix

            Function mightThrow has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                                            mightThrow = function() {
                                                var returned, then;
            
                                                // Support: Promises/A+ section 2.3.3.3.3
                                                // https://promisesaplus.com/#point-59
            Severity: Minor
            Found in core/static/vendor/jquery/dist/jquery.js - About 1 hr to fix

              Function mightThrow has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                                              mightThrow = function() {
                                                  var returned, then;
              
                                                  // Support: Promises/A+ section 2.3.3.3.3
                                                  // https://promisesaplus.com/#point-59
              Severity: Minor
              Found in core/static/vendor/jquery/dist/jquery.slim.js - About 1 hr to fix

                Function mightThrow has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                                mightThrow = function() {
                                                    var returned, then;
                
                                                    // Support: Promises/A+ section 2.3.3.3.3
                                                    // https://promisesaplus.com/#point-59
                Severity: Minor
                Found in core/static/vendor/jquery/src/deferred.js - About 1 hr to fix

                  Function getDatePickerTemplate has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              getDatePickerTemplate = function () {
                                  var headTemplate = $('<thead>')
                                          .append($('<tr>')
                                              .append($('<th>').addClass('prev').attr('data-action', 'previous')
                                                  .append($('<span>').addClass(options.icons.previous))

                    Function addPointerListenerStart has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        addPointerListenerStart: function (obj, type, handler, id) {
                            var pre = '_leaflet_',
                                pointers = this._pointers;
                    
                            var cb = function (e) {
                    Severity: Minor
                    Found in core/static/vendor/leaflet/dist/leaflet-src.js - About 1 hr to fix

                      Function throws has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          "throws": function( block, expected, message ) {
                              var actual, expectedType,
                                  expectedOutput = expected,
                                  ok = false,
                                  currentTest = ( this instanceof Assert && this.test ) || QUnit.config.current;
                      Severity: Minor
                      Found in core/static/vendor/jquery-expander/test/qunit/qunit.1.19.0.js - About 1 hr to fix

                        Function before has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            before: function() {
                                if (
                        
                                    // Emit moduleStart when we're switching from one module to another
                                    this.module !== config.previousModule ||
                        Severity: Minor
                        Found in core/static/vendor/jquery-expander/test/qunit/qunit.1.19.0.js - About 1 hr to fix

                          Function when has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            when: function( subordinate /* , ..., subordinateN */ ) {
                              var i = 0,
                                resolveValues = slice.call( arguments ),
                                length = resolveValues.length,
                          
                          
                          Severity: Minor
                          Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js - About 1 hr to fix

                            Function show has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              Collapse.prototype.show = function () {
                                if (this.transitioning || this.$element.hasClass('in')) return
                            
                                var activesData
                                var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
                            Severity: Minor
                            Found in core/static/vendor/bootstrap/js/collapse.js - About 1 hr to fix

                              Function show has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                Collapse.prototype.show = function () {
                                  if (this.transitioning || this.$element.hasClass('in')) return
                              
                                  var activesData
                                  var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
                              Severity: Minor
                              Found in core/static/vendor/bootstrap/dist/js/bootstrap.js - About 1 hr to fix

                                Function localeMonthsParse has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                export function localeMonthsParse (monthName, format, strict) {
                                    var i, mom, regex;
                                
                                    if (this._monthsParseExact) {
                                        return handleStrictParse.call(this, monthName, format, strict);
                                Severity: Minor
                                Found in core/static/vendor/moment/src/lib/units/month.js - About 1 hr 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 weekdaysRegex has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                export function weekdaysRegex (isStrict) {
                                    if (this._weekdaysParseExact) {
                                        if (!hasOwnProp(this, '_weekdaysRegex')) {
                                            computeWeekdaysParse.call(this);
                                        }
                                Severity: Minor
                                Found in core/static/vendor/moment/src/lib/units/day-of-week.js - About 1 hr 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 ordinal has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    ordinal : function (number, period) {
                                        var output = (number === 1) ? 'r' :
                                            (number === 2) ? 'n' :
                                            (number === 3) ? 'r' :
                                            (number === 4) ? 't' : 'è';
                                Severity: Minor
                                Found in core/static/vendor/moment/src/locale/ca.js - About 1 hr 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 chooseLocale has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function chooseLocale(names) {
                                    var i = 0, j, next, locale, split;
                                
                                    while (i < names.length) {
                                        split = normalizeLocale(names[i]).split('-');
                                Severity: Minor
                                Found in core/static/vendor/moment/src/lib/locale/locales.js - About 1 hr 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 getSetOffset has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export function getSetOffset (input, keepLocalTime) {
                                    var offset = this._offset || 0,
                                        localAdjust;
                                    if (!this.isValid()) {
                                        return input != null ? this : NaN;
                                Severity: Minor
                                Found in core/static/vendor/moment/src/lib/units/offset.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language