bronycub/sugarcub

View on GitHub

Showing 3,238 of 3,238 total issues

Consider simplifying this complex logical expression.
Open

    if (a && getParsingFlags(m).overflow === -2) {
        overflow =
            a[MONTH]       < 0 || a[MONTH]       > 11  ? MONTH :
            a[DATE]        < 1 || a[DATE]        > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
            a[HOUR]        < 0 || a[HOUR]        > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
Severity: Critical
Found in core/static/vendor/moment/src/lib/create/check-overflow.js - About 2 hrs to fix

    Consider simplifying this complex logical expression.
    Open

        if (a && getParsingFlags(m).overflow === -2) {
            overflow =
                a[MONTH]       < 0 || a[MONTH]       > 11  ? MONTH :
                a[DATE]        < 1 || a[DATE]        > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
                a[HOUR]        < 0 || a[HOUR]        > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
    Severity: Critical
    Found in core/static/vendor/moment/moment.js - About 2 hrs to fix

      Consider simplifying this complex logical expression.
      Open

          if (a && getParsingFlags(m).overflow === -2) {
              overflow =
                  a[MONTH]       < 0 || a[MONTH]       > 11  ? MONTH :
                  a[DATE]        < 1 || a[DATE]        > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
                  a[HOUR]        < 0 || a[HOUR]        > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
      Severity: Critical
      Found in core/static/vendor/moment/min/moment-with-locales.js - About 2 hrs to fix

        Consider simplifying this complex logical expression.
        Open

                                if ( forward && useCache ) {
        
                                    // Seek `elem` from a previously-cached index
        
                                    // ...in a gzip-friendly way
        Severity: Critical
        Found in core/static/vendor/jquery/dist/jquery.js - About 2 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                                  if ( forward && useCache ) {
          
                                      // Seek `elem` from a previously-cached index
          
                                      // ...in a gzip-friendly way
          Severity: Critical
          Found in core/static/vendor/jquery/dist/jquery.slim.js - About 2 hrs to fix

            Consider simplifying this complex logical expression.
            Open

                                    if ( forward && useCache ) {
            
                                        // Seek `elem` from a previously-cached index
            
                                        // ...in a gzip-friendly way
            Severity: Critical
            Found in core/static/vendor/jquery/external/sizzle/dist/sizzle.js - About 2 hrs to fix

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

                  function bindCallbacks(o, callbacks, args) {
                      var prop = QUnit.objectType(o);
                      if (prop) {
                          if (QUnit.objectType(callbacks[prop]) === "function") {
                              return callbacks[prop].apply(callbacks, args);
              core/static/vendor/jquery-expander/test/qunit/qunit.js on lines 778..787

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

              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 bindCallbacks(o, callbacks, args) {
                      var prop = QUnit.objectType(o);
                      if (prop) {
                          if (QUnit.objectType(callbacks[prop]) === "function") {
                              return callbacks[prop].apply(callbacks, args);
              Severity: Major
              Found in core/static/vendor/jquery-expander/test/qunit/qunit.js and 1 other location - About 2 hrs to fix
              core/static/vendor/bootstrap-datepicker/tests/assets/qunit.js on lines 1103..1112

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

              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
                  version = "3.1.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/animatedSelector,-effects/Tween,-deprecated",
              
                  // Define a local copy of jQuery
                  jQuery = function( selector, context ) {
              Severity: Major
              Found in core/static/vendor/jquery/dist/jquery.slim.js and 1 other location - About 2 hrs to fix
              core/static/vendor/jquery/dist/jquery.js on lines 90..112

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

              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 (widget.find('.datepicker').is(':visible')) {
                                  this.date(d.clone().add(7, 'd'));
                              } else {
                                  this.date(d.clone().subtract(this.stepping(), 'm'));
                              }
              core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 2526..2530

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

              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
                  version = "3.1.1",
              
                  // Define a local copy of jQuery
                  jQuery = function( selector, context ) {
              Severity: Major
              Found in core/static/vendor/jquery/dist/jquery.js and 1 other location - About 2 hrs to fix
              core/static/vendor/jquery/dist/jquery.slim.js on lines 90..112

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

              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 (widget.find('.datepicker').is(':visible')) {
                                  this.date(d.clone().subtract(7, 'd'));
                              } else {
                                  this.date(d.clone().add(this.stepping(), 'm'));
                              }
              core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 2538..2542

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

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

              function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                  if ( postFilter && !postFilter[ expando ] ) {
                      postFilter = setMatcher( postFilter );
                  }
                  if ( postFinder && !postFinder[ expando ] ) {
              Severity: Major
              Found in core/static/vendor/jquery/dist/jquery.js - About 2 hrs to fix

                Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                    if ( postFilter && !postFilter[ expando ] ) {
                        postFilter = setMatcher( postFilter );
                    }
                    if ( postFinder && !postFinder[ expando ] ) {
                Severity: Major
                Found in core/static/vendor/jquery/dist/jquery.slim.js - About 2 hrs to fix

                  Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                      if ( postFilter && !postFilter[ expando ] ) {
                          postFilter = setMatcher( postFilter );
                      }
                      if ( postFinder && !postFinder[ expando ] ) {
                  Severity: Major
                  Found in core/static/vendor/jquery/external/sizzle/dist/sizzle.js - About 2 hrs to fix

                    Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                      if ( postFilter && !postFilter[ expando ] ) {
                        postFilter = setMatcher( postFilter );
                      }
                      if ( postFinder && !postFinder[ expando ] ) {
                    Severity: Major
                    Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js - About 2 hrs to fix

                      Function diff has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function diff(o, n) {
                              var ns = {};
                              var os = {};
                              var i;
                      
                      
                      Severity: Major
                      Found in core/static/vendor/bootstrap-datepicker/tests/assets/qunit.js - About 2 hrs to fix

                        Function superMatcher has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                superMatcher = function( seed, context, xml, results, outermost ) {
                                    var elem, j, matcher,
                                        matchedCount = 0,
                                        i = "0",
                                        unmatched = seed && [],
                        Severity: Major
                        Found in core/static/vendor/jquery/dist/jquery.js - About 2 hrs to fix

                          Function superMatcher has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  superMatcher = function( seed, context, xml, results, outermost ) {
                                      var elem, j, matcher,
                                          matchedCount = 0,
                                          i = "0",
                                          unmatched = seed && [],
                          Severity: Major
                          Found in core/static/vendor/jquery/dist/jquery.slim.js - About 2 hrs to fix

                            Function superMatcher has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    superMatcher = function( seed, context, xml, results, outermost ) {
                                        var elem, j, matcher,
                                            matchedCount = 0,
                                            i = "0",
                                            unmatched = seed && [],
                            Severity: Major
                            Found in core/static/vendor/jquery/external/sizzle/dist/sizzle.js - About 2 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language