bronycub/sugarcub

View on GitHub

Showing 3,238 of 3,238 total issues

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

function getSetRelativeTimeThreshold (threshold, limit) {
    if (thresholds[threshold] === undefined) {
        return false;
    }
    if (limit === undefined) {
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 4130..4139

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

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

                    case 0:
                        if (vFormatParts[0] === 'm' || vFormatParts[0] === 'n') {
                            vDate.setMonth(iSec - 1);
                        } else {
                            vDate.setDate(iSec);
core/static/vendor/php-date-formatter/js/php-date-formatter.js on lines 249..255

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

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

                    case 1:
                        if (vFormatParts[0] === 'm' || vFormatParts[0] === 'n') {
                            vDate.setDate(iSec);
                        } else {
                            vDate.setMonth(iSec - 1);
core/static/vendor/datetimepicker/build/jquery.datetimepicker.full.js on lines 218..224

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

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

jQuery.expr.pseudos.animated = function( elem ) {
    return jQuery.grep( jQuery.timers, function( fn ) {
        return elem === fn.elem;
    } ).length;
};
Severity: Major
Found in core/static/vendor/jquery/src/effects/animatedSelector.js and 1 other location - About 1 hr to fix
core/static/vendor/jquery-expander/test/jquery.1.11.3.js on lines 10042..10046

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

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

jQuery.expr.filters.animated = function( elem ) {
  return jQuery.grep(jQuery.timers, function( fn ) {
    return elem === fn.elem;
  }).length;
};
Severity: Major
Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js and 1 other location - About 1 hr to fix
core/static/vendor/jquery/src/effects/animatedSelector.js on lines 9..13

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

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

Consider simplifying this complex logical expression.
Open

    if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {

        // Trust units reported by jQuery.css
        unit = unit || initialInUnit[ 3 ];

Severity: Critical
Found in core/static/vendor/jquery/dist/jquery.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

        if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
    
            // Trust units reported by jQuery.css
            unit = unit || initialInUnit[ 3 ];
    
    
    Severity: Critical
    Found in core/static/vendor/jquery/dist/jquery.slim.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

          if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
      
              // Trust units reported by jQuery.css
              unit = unit || initialInUnit[ 3 ];
      
      
      Severity: Critical
      Found in core/static/vendor/jquery/src/css/adjustCSS.js - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

                    } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
                      diff = cache[1];
        
                    // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
                    } else {
        Severity: Critical
        Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                if ( start && start[ 3 ] !== unit ) {
                  // Trust units reported by jQuery.css
                  unit = unit || start[ 3 ];
          
                  // Make sure we update the tween properties later on
          Severity: Critical
          Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js - About 1 hr to fix

            Function showHide has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function showHide( elements, show ) {
                var display, elem,
                    values = [],
                    index = 0,
                    length = elements.length;
            Severity: Minor
            Found in core/static/vendor/jquery/dist/jquery.js - About 1 hr to fix

              Function showHide has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function showHide( elements, show ) {
                  var display, elem,
                      values = [],
                      index = 0,
                      length = elements.length;
              Severity: Minor
              Found in core/static/vendor/jquery/dist/jquery.slim.js - About 1 hr to fix

                Function showHide has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function showHide( elements, show ) {
                    var display, elem,
                        values = [],
                        index = 0,
                        length = elements.length;
                Severity: Minor
                Found in core/static/vendor/jquery/src/css/showHide.js - About 1 hr to fix

                  Function line_time has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                          line_time = function line_time(h, m) {
                                              var now = _xdsoft_datetime.now(), optionDateTime, current_time,
                                                  isALlowTimesInit = options.allowTimes && $.isArray(options.allowTimes) && options.allowTimes.length;
                                              now.setHours(h);
                                              h = parseInt(now.getHours(), 10);
                  Severity: Minor
                  Found in core/static/vendor/datetimepicker/jquery.datetimepicker.js - About 1 hr to fix

                    Function line_time has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                            line_time = function line_time(h, m) {
                                                var now = _xdsoft_datetime.now(), optionDateTime, current_time,
                                                    isALlowTimesInit = options.allowTimes && $.isArray(options.allowTimes) && options.allowTimes.length;
                                                now.setHours(h);
                                                h = parseInt(now.getHours(), 10);

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

                      jQuery.each( [
                          "ajaxStart",
                          "ajaxStop",
                          "ajaxComplete",
                          "ajaxError",
                      Severity: Major
                      Found in core/static/vendor/jquery/dist/jquery.js and 2 other locations - About 1 hr to fix
                      core/static/vendor/jquery-expander/test/jquery.1.11.3.js on lines 10033..10037
                      core/static/vendor/jquery/src/event/ajax.js on lines 9..20

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

                      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 addWeekParseToken (token, callback) {
                          addParseToken(token, function (input, array, config, token) {
                              config._w = config._w || {};
                              callback(input, config._w, config, token);
                          });
                      Severity: Major
                      Found in core/static/vendor/moment/src/lib/parse/token.js and 2 other locations - About 1 hr to fix
                      core/static/vendor/moment/min/moment-with-locales.js on lines 745..750
                      core/static/vendor/moment/moment.js on lines 751..756

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

                      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 unescapeFormat(s) {
                          return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
                              return p1 || p2 || p3 || p4;
                          }));
                      }
                      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 724..728
                      core/static/vendor/moment/src/lib/parse/regex.js on lines 46..50

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

                      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

                      jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
                        jQuery.fn[ type ] = function( fn ) {
                          return this.on( type, fn );
                        };
                      });
                      Severity: Major
                      Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js and 2 other locations - About 1 hr to fix
                      core/static/vendor/jquery/dist/jquery.js on lines 9854..9865
                      core/static/vendor/jquery/src/event/ajax.js on lines 9..20

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

                      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

                      addFormatToken('Hmmss', 0, 0, function () {
                          return '' + this.hours() + zeroFill(this.minutes(), 2) +
                              zeroFill(this.seconds(), 2);
                      });
                      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 1641..1644
                      core/static/vendor/moment/src/lib/units/hour.js on lines 39..42

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

                      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