bronycub/sugarcub

View on GitHub

Showing 3,238 of 3,238 total issues

Function addDoubleTapListener has 61 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    addDoubleTapListener: function (obj, handler, id) {
        var last,
            doubleTap = false,
            delay = 250,
            touch,
Severity: Major
Found in core/static/vendor/leaflet/dist/leaflet-src.js - About 2 hrs to fix

    Function superMatcher has 61 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-expander/test/jquery.1.11.3.js - About 2 hrs to fix

      Function configFromArray has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

      export function configFromArray (config) {
          var i, date, input = [], currentDate, yearToUse;
      
          if (config._d) {
              return;
      Severity: Minor
      Found in core/static/vendor/moment/src/lib/create/from-array.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 dayOfYearFromWeekInfo has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

      function dayOfYearFromWeekInfo(config) {
          var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
      
          w = config._w;
          if (w.GG != null || w.W != null || w.E != null) {
      Severity: Minor
      Found in core/static/vendor/moment/src/lib/create/from-array.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 diff has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function diff(o, n){
              var ns = new Object();
              var os = new Object();
              
              for (var i = 0; i < n.length; i++) {
      Severity: Major
      Found in core/static/vendor/jquery-expander/test/qunit/qunit.js - About 2 hrs to fix

        Function init has 60 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          init = jQuery.fn.init = function( selector, context ) {
            var match, elem;
        
            // HANDLE: $(""), $(null), $(undefined), $(false)
            if ( !selector ) {
        Severity: Major
        Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js - About 2 hrs to fix

          Function send has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  send: function( headers, complete ) {
                    var i,
                      xhr = options.xhr(),
                      id = ++xhrId;
          
          
          Severity: Major
          Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js - About 2 hrs to fix

            Function domManip has 60 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              domManip: function( args, callback ) {
            
                // Flatten any nested arrays
                args = concat.apply( [], args );
            
            
            Severity: Major
            Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js - About 2 hrs to fix

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

              function parseWeekday(input, locale) {
                  if (typeof input !== 'string') {
                      return input;
                  }
              
              
              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 1329..1344
              core/static/vendor/moment/src/lib/units/day-of-week.js on lines 74..89

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

              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 parseWeekday(input, locale) {
                  if (typeof input !== 'string') {
                      return input;
                  }
              
              
              Severity: Major
              Found in core/static/vendor/moment/src/lib/units/day-of-week.js and 2 other locations - About 2 hrs to fix
              core/static/vendor/moment/min/moment-with-locales.js on lines 1323..1338
              core/static/vendor/moment/moment.js on lines 1329..1344

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

              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 parseWeekday(input, locale) {
                  if (typeof input !== 'string') {
                      return input;
                  }
              
              
              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 1323..1338
              core/static/vendor/moment/src/lib/units/day-of-week.js on lines 74..89

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

              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

                              return QUnit.objectType(b) === "regexp" &&
                                  // the regex itself
                                  a.source === b.source &&
                                  // and its modifers
                                  a.global === b.global &&
              core/static/vendor/jquery-expander/test/qunit/qunit.1.19.0.js on lines 1502..1512

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

              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 ( k1 === -d || ( k1 !== d && v1[ k1Offset - 1 ] < v1[ k1Offset + 1 ] ) ) {
                                  x1 = v1[ k1Offset + 1 ];
                              } else {
                                  x1 = v1[ k1Offset - 1 ] + 1;
                              }
              core/static/vendor/jquery-expander/test/qunit/qunit.1.19.0.js on lines 2659..2663

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

              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

                                  return QUnit.objectType( b ) === "regexp" &&
              
                                      // the regex itself
                                      a.source === b.source &&
              
              
              core/static/vendor/bootstrap-datepicker/tests/assets/qunit.js on lines 1149..1156

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

              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 ( k2 === -d || ( k2 !== d && v2[ k2Offset - 1 ] < v2[ k2Offset + 1 ] ) ) {
                                  x2 = v2[ k2Offset + 1 ];
                              } else {
                                  x2 = v2[ k2Offset - 1 ] + 1;
                              }
              core/static/vendor/jquery-expander/test/qunit/qunit.1.19.0.js on lines 2625..2629

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

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

              function handleStrictParse(weekdayName, format, strict) {
                  var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
                  if (!this._weekdaysParse) {
                      this._weekdaysParse = [];
                      this._shortWeekdaysParse = [];
              Severity: Major
              Found in core/static/vendor/moment/src/lib/units/day-of-week.js - About 2 hrs to fix

                Function handleStrictParse$1 has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function handleStrictParse$1(weekdayName, format, strict) {
                    var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
                    if (!this._weekdaysParse) {
                        this._weekdaysParse = [];
                        this._shortWeekdaysParse = [];
                Severity: Major
                Found in core/static/vendor/moment/moment.js - About 2 hrs to fix

                  Function handleStrictParse$1 has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function handleStrictParse$1(weekdayName, format, strict) {
                      var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
                      if (!this._weekdaysParse) {
                          this._weekdaysParse = [];
                          this._shortWeekdaysParse = [];
                  Severity: Major
                  Found in core/static/vendor/moment/min/moment-with-locales.js - About 2 hrs to fix

                    Function ajaxConvert has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function ajaxConvert( s, response, jqXHR, isSuccess ) {
                        var conv2, current, conv, tmp, prev,
                            converters = {},
                    
                            // Work with a copy of dataTypes in case we need to modify it for conversion
                    Severity: Major
                    Found in core/static/vendor/jquery/dist/jquery.js - About 2 hrs to fix

                      Function ajaxConvert has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function ajaxConvert( s, response, jqXHR, isSuccess ) {
                          var conv2, current, conv, tmp, prev,
                              converters = {},
                      
                              // Work with a copy of dataTypes in case we need to modify it for conversion
                      Severity: Major
                      Found in core/static/vendor/jquery/src/ajax.js - About 2 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language