bronycub/sugarcub

View on GitHub

Showing 3,238 of 3,238 total issues

Function _resetView has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _resetView: function (center, zoom, preserveMapOffset, afterZoomAnim) {

        var zoomChanged = (this._zoom !== zoom);

        if (!afterZoomAnim) {
Severity: Minor
Found in core/static/vendor/leaflet/dist/leaflet-src.js - About 1 hr to fix

    Function widgetPositioning has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            picker.widgetPositioning = function (widgetPositioning) {
                if (arguments.length === 0) {
                    return $.extend({}, options.widgetPositioning);
                }
    
    

      Function objectType has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function objectType( obj ) {
          if ( typeof obj === "undefined" ) {
              return "undefined";
          }
      
      
      Severity: Minor
      Found in core/static/vendor/jquery-expander/test/qunit/qunit.1.19.0.js - About 1 hr to fix

        Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          finish: function( type ) {
            if ( type !== false ) {
              type = type || "fx";
            }
            return this.each(function() {
        Severity: Minor
        Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js - About 1 hr to fix

          Function fix has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            fix: function( event ) {
              if ( event[ jQuery.expando ] ) {
                return event;
              }
          
          
          Severity: Minor
          Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js - About 1 hr to fix

            Function checkPosition has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              Affix.prototype.checkPosition = function () {
                if (!this.$element.is(':visible')) return
            
                var height       = this.$element.height()
                var offset       = this.options.offset
            Severity: Minor
            Found in core/static/vendor/bootstrap/dist/js/bootstrap.js - About 1 hr to fix

              Function checkPosition has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                Affix.prototype.checkPosition = function () {
                  if (!this.$element.is(':visible')) return
              
                  var height       = this.$element.height()
                  var offset       = this.options.offset
              Severity: Minor
              Found in core/static/vendor/bootstrap/js/affix.js - About 1 hr to fix

                Identical blocks of code found in 3 locations. Consider refactoring.
                Open

                function parseIsoWeekday(input, locale) {
                    if (typeof input === 'string') {
                        return locale.weekdaysParse(input) % 7 || 7;
                    }
                    return isNaN(input) ? null : input;
                Severity: Major
                Found in core/static/vendor/moment/min/moment-with-locales.js and 2 other locations - About 1 hr to fix
                core/static/vendor/moment/moment.js on lines 1346..1351
                core/static/vendor/moment/src/lib/units/day-of-week.js on lines 91..96

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

                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 3 locations. Consider refactoring.
                Open

                function parseIsoWeekday(input, locale) {
                    if (typeof input === 'string') {
                        return locale.weekdaysParse(input) % 7 || 7;
                    }
                    return isNaN(input) ? null : input;
                Severity: Major
                Found in core/static/vendor/moment/src/lib/units/day-of-week.js and 2 other locations - About 1 hr to fix
                core/static/vendor/moment/min/moment-with-locales.js on lines 1340..1345
                core/static/vendor/moment/moment.js on lines 1346..1351

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

                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 3 locations. Consider refactoring.
                Open

                function parseIsoWeekday(input, locale) {
                    if (typeof input === 'string') {
                        return locale.weekdaysParse(input) % 7 || 7;
                    }
                    return isNaN(input) ? null : input;
                Severity: Major
                Found in core/static/vendor/moment/moment.js and 2 other locations - About 1 hr to fix
                core/static/vendor/moment/min/moment-with-locales.js on lines 1340..1345
                core/static/vendor/moment/src/lib/units/day-of-week.js on lines 91..96

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

                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

                function getParseRegexForToken (token, config) {
                    if (!hasOwnProp(regexes, token)) {
                        return new RegExp(unescapeFormat(token));
                    }
                
                
                Severity: Major
                Found in core/static/vendor/moment/moment.js and 1 other location - About 1 hr to fix
                core/static/vendor/moment/min/moment-with-locales.js on lines 709..715

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

                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

                function getParseRegexForToken (token, config) {
                    if (!hasOwnProp(regexes, token)) {
                        return new RegExp(unescapeFormat(token));
                    }
                
                
                Severity: Major
                Found in core/static/vendor/moment/min/moment-with-locales.js and 1 other location - About 1 hr to fix
                core/static/vendor/moment/moment.js on lines 715..721

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

                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 3 locations. Consider refactoring.
                Open

                function warn(msg) {
                    if (hooks.suppressDeprecationWarnings === false &&
                            (typeof console !==  'undefined') && console.warn) {
                        console.warn('Deprecation warning: ' + msg);
                    }
                Severity: Major
                Found in core/static/vendor/moment/moment.js and 2 other locations - About 1 hr to fix
                core/static/vendor/moment/min/moment-with-locales.js on lines 282..287
                core/static/vendor/moment/src/lib/utils/deprecate.js on lines 5..10

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

                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 3 locations. Consider refactoring.
                Open

                function warn(msg) {
                    if (hooks.suppressDeprecationWarnings === false &&
                            (typeof console !==  'undefined') && console.warn) {
                        console.warn('Deprecation warning: ' + msg);
                    }
                Severity: Major
                Found in core/static/vendor/moment/min/moment-with-locales.js and 2 other locations - About 1 hr to fix
                core/static/vendor/moment/moment.js on lines 288..293
                core/static/vendor/moment/src/lib/utils/deprecate.js on lines 5..10

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

                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 3 locations. Consider refactoring.
                Open

                function warn(msg) {
                    if (hooks.suppressDeprecationWarnings === false &&
                            (typeof console !==  'undefined') && console.warn) {
                        console.warn('Deprecation warning: ' + msg);
                    }
                Severity: Major
                Found in core/static/vendor/moment/src/lib/utils/deprecate.js and 2 other locations - About 1 hr to fix
                core/static/vendor/moment/min/moment-with-locales.js on lines 282..287
                core/static/vendor/moment/moment.js on lines 288..293

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

                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

                        if (this.options.clickable) {
                            this._map.on('mousemove', this._onMouseMove, this);
                            this._map.on('click dblclick contextmenu', this._fireMouseEvent, this);
                        }
                Severity: Major
                Found in core/static/vendor/leaflet/dist/leaflet-src.js and 1 other location - About 1 hr to fix
                core/static/vendor/leaflet/dist/leaflet-src.js on lines 5051..5054

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

                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

                        if (this.options.clickable) {
                            this._map.off('click', this._onClick, this);
                            this._map.off('mousemove', this._onMouseMove, this);
                        }
                Severity: Major
                Found in core/static/vendor/leaflet/dist/leaflet-src.js and 1 other location - About 1 hr to fix
                core/static/vendor/leaflet/dist/leaflet-src.js on lines 5146..5149

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

                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 ordinal has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                    ordinal : function (number) {
                        var b = number % 10,
                            output = (~~(number % 100 / 10) === 1) ? 'th' :
                            (b === 1) ? 'st' :
                            (b === 2) ? 'nd' :
                Severity: Minor
                Found in core/static/vendor/moment/src/locale/en-ie.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 10 (exceeds 5 allowed). Consider refactoring.
                Open

                    ordinal : function (number) {
                        var b = number % 10,
                            output = (~~(number % 100 / 10) === 1) ? 'th' :
                            (b === 1) ? 'st' :
                            (b === 2) ? 'nd' :
                Severity: Minor
                Found in core/static/vendor/moment/src/locale/en-nz.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 10 (exceeds 5 allowed). Consider refactoring.
                Open

                    ordinal : function (number) {
                        var b = number % 10,
                            output = (~~(number % 100 / 10) === 1) ? 'th' :
                            (b === 1) ? 'st' :
                            (b === 2) ? 'nd' :
                Severity: Minor
                Found in core/static/vendor/moment/src/locale/en-gb.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

                Severity
                Category
                Status
                Source
                Language