bronycub/sugarcub

View on GitHub

Showing 3,238 of 3,238 total issues

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

            if (arguments.length === 0) {
                return (options.disabledDates ? $.extend({}, options.disabledDates) : options.disabledDates);
            }
core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 2213..2215
core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 2240..2242

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

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 relativeTime (number, withoutSuffix, string, isFuture) {
    var output = this._relativeTime[string];
    return (isFunction(output)) ?
        output(number, withoutSuffix, string, isFuture) :
        output.replace(/%d/i, number);
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 471..476
core/static/vendor/moment/src/lib/locale/relative.js on lines 19..24

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

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

export function relativeTime (number, withoutSuffix, string, isFuture) {
    var output = this._relativeTime[string];
    return (isFunction(output)) ?
        output(number, withoutSuffix, string, isFuture) :
        output.replace(/%d/i, number);
Severity: Major
Found in core/static/vendor/moment/src/lib/locale/relative.js and 2 other locations - About 1 hr to fix
core/static/vendor/moment/min/moment-with-locales.js on lines 471..476
core/static/vendor/moment/moment.js on lines 477..482

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

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

            if (arguments.length === 0) {
                return (options.disabledHours ? $.extend({}, options.disabledHours) : options.disabledHours);
            }
core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 1603..1605
core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 2213..2215

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

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

                incrementMinutes: function () {
                    var newDate = date.clone().add(options.stepping, 'm');
                    if (isValid(newDate, 'm')) {
                        setValue(newDate);
                    }
core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 1082..1087

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

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

                decrementMinutes: function () {
                    var newDate = date.clone().subtract(options.stepping, 'm');
                    if (isValid(newDate, 'm')) {
                        setValue(newDate);
                    }
core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 1061..1066

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

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 self = this, vSettings = self.dateSettings, fmt, backspace = /\\?(.?)/gi, doFormat = function (t, s) {
                return fmt[t] ? fmt[t]() : s;
            };
core/static/vendor/php-date-formatter/js/php-date-formatter.js on lines 291..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 56.

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 self = this, vSettings = self.dateSettings, fmt, backslash = /\\?(.?)/gi, doFormat = function (t, s) {
                return fmt[t] ? fmt[t]() : s;
            };
core/static/vendor/datetimepicker/build/jquery.datetimepicker.full.js on lines 252..254

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

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 eifelerRegelAppliesToNumber has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function eifelerRegelAppliesToNumber(number) {
    number = parseInt(number, 10);
    if (isNaN(number)) {
        return false;
    }
Severity: Minor
Found in core/static/vendor/moment/src/locale/lb.js - About 1 hr to fix

    Function eifelerRegelAppliesToNumber has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function eifelerRegelAppliesToNumber(number) {
        number = parseInt(number, 10);
        if (isNaN(number)) {
            return false;
        }
    Severity: Minor
    Found in core/static/vendor/moment/locale/lb.js - About 1 hr to fix

      Function computeMonthsParse has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function computeMonthsParse () {
          function cmpLenRev(a, b) {
              return b.length - a.length;
          }
      
      
      Severity: Minor
      Found in core/static/vendor/moment/src/lib/units/month.js - About 1 hr to fix

        Function deprecate has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function deprecate(msg, fn) {
            var firstTime = true;
        
            return extend(function () {
                if (hooks.deprecationHandler != null) {
        Severity: Minor
        Found in core/static/vendor/moment/src/lib/utils/deprecate.js - About 1 hr to fix

          Function eifelerRegelAppliesToNumber has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function eifelerRegelAppliesToNumber(number) {
              number = parseInt(number, 10);
              if (isNaN(number)) {
                  return false;
              }
          Severity: Minor
          Found in core/static/vendor/moment/min/moment-with-locales.js - About 1 hr to fix

            Function computeMonthsParse has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function computeMonthsParse () {
                function cmpLenRev(a, b) {
                    return b.length - a.length;
                }
            
            
            Severity: Minor
            Found in core/static/vendor/moment/min/moment-with-locales.js - About 1 hr to fix

              Function deprecate has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function deprecate(msg, fn) {
                  var firstTime = true;
              
                  return extend(function () {
                      if (hooks.deprecationHandler != null) {
              Severity: Minor
              Found in core/static/vendor/moment/moment.js - About 1 hr to fix

                Function computeMonthsParse has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function computeMonthsParse () {
                    function cmpLenRev(a, b) {
                        return b.length - a.length;
                    }
                
                
                Severity: Minor
                Found in core/static/vendor/moment/moment.js - About 1 hr to fix

                  Function deprecate has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function deprecate(msg, fn) {
                      var firstTime = true;
                  
                      return extend(function () {
                          if (hooks.deprecationHandler != null) {
                  Severity: Minor
                  Found in core/static/vendor/moment/min/moment-with-locales.js - About 1 hr to fix

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

                        remove: function( owner, key ) {
                            var i,
                                cache = owner[ this.expando ];
                    
                            if ( cache === undefined ) {
                    Severity: Minor
                    Found in core/static/vendor/jquery/dist/jquery.js - About 1 hr to fix

                      Function eifelerRegelAppliesToNumber has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function eifelerRegelAppliesToNumber(number) {
                          number = parseInt(number, 10);
                          if (isNaN(number)) {
                              return false;
                          }
                      Severity: Minor
                      Found in core/static/vendor/moment/min/locales.js - About 1 hr to fix

                        Function augmentWidthOrHeight has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
                            var i,
                                val = 0;
                        
                            // If we already have the right measurement, avoid augmentation
                        Severity: Minor
                        Found in core/static/vendor/jquery/dist/jquery.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language