bronycub/sugarcub

View on GitHub

Showing 3,238 of 3,238 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        for (var i = L.Draggable.START.length - 1; i >= 0; i--) {
            L.DomEvent.on(this._dragStartTarget, L.Draggable.START[i], this._onDown, this);
        }
Severity: Major
Found in core/static/vendor/leaflet/dist/leaflet-src.js and 1 other location - About 2 hrs to fix
core/static/vendor/leaflet/dist/leaflet-src.js on lines 6646..6648

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

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

        for (var i = L.Draggable.START.length - 1; i >= 0; i--) {
            L.DomEvent.off(this._dragStartTarget, L.Draggable.START[i], this._onDown, this);
        }
Severity: Major
Found in core/static/vendor/leaflet/dist/leaflet-src.js and 1 other location - About 2 hrs to fix
core/static/vendor/leaflet/dist/leaflet-src.js on lines 6636..6638

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

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

    var input = $('<input />')
                .appendTo('#qunit-fixture')
                .val('2012-10-26')
                .datepicker({
                    format: 'yyyy-mm-dd',
core/static/vendor/bootstrap-datepicker/tests/suites/options.js on lines 1024..1033

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

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

}, pluralForm = function (n) {
    return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
}, plurals = {
Severity: Minor
Found in core/static/vendor/moment/src/locale/ar-ly.js - About 2 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 pluralForm has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

}, pluralForm = function (n) {
    return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
}, plurals = {
Severity: Minor
Found in core/static/vendor/moment/src/locale/ar.js - About 2 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 copyConfig has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

export function copyConfig(to, from) {
    var i, prop, val;

    if (!isUndefined(from._isAMomentObject)) {
        to._isAMomentObject = from._isAMomentObject;
Severity: Minor
Found in core/static/vendor/moment/src/lib/moment/constructor.js - About 2 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 createDuration has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function createDuration (input, key) {
    var duration = input,
        // matching against regexp is expensive, do it on demand
        match = null,
        sign,
Severity: Major
Found in core/static/vendor/moment/src/lib/duration/create.js - About 2 hrs to fix

    Function createDuration has 52 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function createDuration (input, key) {
        var duration = input,
            // matching against regexp is expensive, do it on demand
            match = null,
            sign,
    Severity: Major
    Found in core/static/vendor/moment/moment.js - About 2 hrs to fix

      Function createDuration has 52 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function createDuration (input, key) {
          var duration = input,
              // matching against regexp is expensive, do it on demand
              match = null,
              sign,
      Severity: Major
      Found in core/static/vendor/moment/min/moment-with-locales.js - About 2 hrs to fix

        Function remove has 52 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            remove: function( elem, types, handler, selector, mappedTypes ) {
        
                var j, origCount, tmp,
                    events, t, handleObj,
                    special, handlers, type, namespaces, origType,
        Severity: Major
        Found in core/static/vendor/jquery/dist/jquery.js - About 2 hrs to fix

          Function remove has 52 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              remove: function( elem, types, handler, selector, mappedTypes ) {
          
                  var j, origCount, tmp,
                      events, t, handleObj,
                      special, handlers, type, namespaces, origType,
          Severity: Major
          Found in core/static/vendor/jquery/dist/jquery.slim.js - About 2 hrs to fix

            Function remove has 52 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                remove: function( elem, types, handler, selector, mappedTypes ) {
            
                    var j, origCount, tmp,
                        events, t, handleObj,
                        special, handlers, type, namespaces, origType,
            Severity: Major
            Found in core/static/vendor/jquery/src/event.js - About 2 hrs to fix

              Function guessDate has 52 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      guessDate: function (vDateStr, vFormat) {
                          if (typeof vDateStr !== 'string') {
                              return vDateStr;
                          }
                          var self = this, vParts = vDateStr.replace(self.separators, '\0').split('\0'), vPattern = /^[djmn]/g,
              Severity: Major
              Found in core/static/vendor/datetimepicker/build/jquery.datetimepicker.full.js - About 2 hrs to fix

                Function done has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function done() {
                    config.autorun = true;
                
                    // Log the last module results
                    if ( config.currentModule ) {
                Severity: Major
                Found in core/static/vendor/bootstrap-datepicker/tests/assets/qunit.js - About 2 hrs to fix

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

                  var
                  
                      // Swappable if display is none or starts with table
                      // except "table", "table-cell", or "table-caption"
                      // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
                  Severity: Major
                  Found in core/static/vendor/jquery/src/css.js and 2 other locations - About 2 hrs to fix
                  core/static/vendor/jquery/dist/jquery.js on lines 6227..6240
                  core/static/vendor/jquery/dist/jquery.slim.js on lines 6227..6240

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

                  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 format (inputString) {
                      if (!inputString) {
                          inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
                      }
                      var output = formatMoment(this, inputString);
                  Severity: Major
                  Found in core/static/vendor/moment/min/moment-with-locales.js and 2 other locations - About 2 hrs to fix
                  core/static/vendor/moment/moment.js on lines 3162..3168
                  core/static/vendor/moment/src/lib/moment/format.js on lines 50..56

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

                  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

                  export function format (inputString) {
                      if (!inputString) {
                          inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
                      }
                      var output = formatMoment(this, inputString);
                  Severity: Major
                  Found in core/static/vendor/moment/src/lib/moment/format.js and 2 other locations - About 2 hrs to fix
                  core/static/vendor/moment/min/moment-with-locales.js on lines 3156..3162
                  core/static/vendor/moment/moment.js on lines 3162..3168

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

                  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

                  var
                  
                      // Swappable if display is none or starts with table
                      // except "table", "table-cell", or "table-caption"
                      // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
                  Severity: Major
                  Found in core/static/vendor/jquery/dist/jquery.js and 2 other locations - About 2 hrs to fix
                  core/static/vendor/jquery/dist/jquery.slim.js on lines 6227..6240
                  core/static/vendor/jquery/src/css.js on lines 25..38

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

                  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

                  var
                  
                      // Swappable if display is none or starts with table
                      // except "table", "table-cell", or "table-caption"
                      // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
                  Severity: Major
                  Found in core/static/vendor/jquery/dist/jquery.slim.js and 2 other locations - About 2 hrs to fix
                  core/static/vendor/jquery/dist/jquery.js on lines 6227..6240
                  core/static/vendor/jquery/src/css.js on lines 25..38

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

                  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 format (inputString) {
                      if (!inputString) {
                          inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
                      }
                      var output = formatMoment(this, inputString);
                  Severity: Major
                  Found in core/static/vendor/moment/moment.js and 2 other locations - About 2 hrs to fix
                  core/static/vendor/moment/min/moment-with-locales.js on lines 3156..3162
                  core/static/vendor/moment/src/lib/moment/format.js on lines 50..56

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

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language