bronycub/sugarcub

View on GitHub

Showing 3,238 of 3,238 total issues

Function add has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    add: function( elem, types, handler, data, selector ) {

        var handleObjIn, eventHandle, 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 matcherFromGroupMatchers has 72 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
        var bySet = setMatchers.length > 0,
            byElement = elementMatchers.length > 0,
            superMatcher = function( seed, context, xml, results, outermost ) {
                var elem, j, matcher,
    Severity: Major
    Found in core/static/vendor/jquery/external/sizzle/dist/sizzle.js - About 2 hrs to fix

      Function _buildEvents has 72 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              _buildEvents: function(){
                  var events = {
                      keyup: $.proxy(function(e){
                          if ($.inArray(e.keyCode, [27, 37, 39, 38, 40, 32, 13, 9]) === -1)
                              this.update();

        Function _buildEvents has 72 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                _buildEvents: function(){
                    var events = {
                        keyup: $.proxy(function(e){
                            if ($.inArray(e.keyCode, [27, 37, 39, 38, 40, 32, 13, 9]) === -1)
                                this.update();
        Severity: Major
        Found in core/static/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js - About 2 hrs to fix

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

          function getPrioritizedUnits(unitsObj) {
              var units = [];
              for (var u in unitsObj) {
                  units.push({unit: u, priority: priorities[u]});
              }
          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 523..532
          core/static/vendor/moment/src/lib/units/priorities.js on lines 7..16

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

          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

          addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
              var month = config._locale.monthsParse(input, token, config._strict);
              // if we didn't find a month name, mark the date as invalid.
              if (month != null) {
                  array[MONTH] = month;
          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 834..842
          core/static/vendor/moment/src/lib/units/month.js on lines 58..66

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

          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

          addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
              var month = config._locale.monthsParse(input, token, config._strict);
              // if we didn't find a month name, mark the date as invalid.
              if (month != null) {
                  array[MONTH] = month;
          Severity: Major
          Found in core/static/vendor/moment/src/lib/units/month.js and 2 other locations - About 2 hrs to fix
          core/static/vendor/moment/min/moment-with-locales.js on lines 828..836
          core/static/vendor/moment/moment.js on lines 834..842

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

          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

          addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
              var month = config._locale.monthsParse(input, token, config._strict);
              // if we didn't find a month name, mark the date as invalid.
              if (month != null) {
                  array[MONTH] = month;
          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 828..836
          core/static/vendor/moment/src/lib/units/month.js on lines 58..66

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

          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 getPrioritizedUnits(unitsObj) {
              var units = [];
              for (var u in unitsObj) {
                  units.push({unit: u, priority: priorities[u]});
              }
          Severity: Major
          Found in core/static/vendor/moment/src/lib/units/priorities.js and 2 other locations - About 2 hrs to fix
          core/static/vendor/moment/min/moment-with-locales.js on lines 517..526
          core/static/vendor/moment/moment.js on lines 523..532

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

          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 getPrioritizedUnits(unitsObj) {
              var units = [];
              for (var u in unitsObj) {
                  units.push({unit: u, priority: priorities[u]});
              }
          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 517..526
          core/static/vendor/moment/src/lib/units/priorities.js on lines 7..16

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

          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

                  picker.showTodayButton = function (showTodayButton) {
                      if (arguments.length === 0) {
                          return options.showTodayButton;
                      }
          
          
          core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 1915..1929
          core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 2034..2049

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

          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

          Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
              set: function( tween ) {
                  if ( tween.elem.nodeType && tween.elem.parentNode ) {
                      tween.elem[ tween.prop ] = tween.now;
                  }
          Severity: Major
          Found in core/static/vendor/jquery/dist/jquery.js and 2 other locations - About 2 hrs to fix
          core/static/vendor/jquery-expander/test/jquery.1.11.3.js on lines 7016..7022
          core/static/vendor/jquery/src/effects/Tween.js on lines 100..106

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

          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

                  picker.sideBySide = function (sideBySide) {
                      if (arguments.length === 0) {
                          return options.sideBySide;
                      }
          
          
          core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 2017..2032
          core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 2034..2049

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

          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

          Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
              set: function( tween ) {
                  if ( tween.elem.nodeType && tween.elem.parentNode ) {
                      tween.elem[ tween.prop ] = tween.now;
                  }
          Severity: Major
          Found in core/static/vendor/jquery/src/effects/Tween.js and 2 other locations - About 2 hrs to fix
          core/static/vendor/jquery-expander/test/jquery.1.11.3.js on lines 7016..7022
          core/static/vendor/jquery/dist/jquery.js on lines 6720..6726

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

          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

          Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
            set: function( tween ) {
              if ( tween.elem.nodeType && tween.elem.parentNode ) {
                tween.elem[ tween.prop ] = tween.now;
              }
          Severity: Major
          Found in core/static/vendor/jquery-expander/test/jquery.1.11.3.js and 2 other locations - About 2 hrs to fix
          core/static/vendor/jquery/dist/jquery.js on lines 6720..6726
          core/static/vendor/jquery/src/effects/Tween.js on lines 100..106

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

          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

                  picker.showClear = function (showClear) {
                      if (arguments.length === 0) {
                          return options.showClear;
                      }
          
          
          core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 1915..1929
          core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 2017..2032

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

          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 11 locations. Consider refactoring.
          Open

          test('Trailing separators', patch_date(function(Date){
              Date.now = UTCDate(2012, 4, 31);
              this.input
                  .val('29.02.2012.')
                  .datepicker({format: 'dd.mm.yyyy.'})
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 139..146
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 148..155
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 157..164
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 166..173
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 175..182
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 184..191
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 193..200
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 202..209
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 211..218
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 220..227

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

          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 11 locations. Consider refactoring.
          Open

          test('-1w: Last week', patch_date(function(Date){
              Date.now = UTCDate(2012, 2, 15);
              this.input
                  .val('-1w')
                  .datepicker({format: 'dd-mm-yyyy'})
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 139..146
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 148..155
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 157..164
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 175..182
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 184..191
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 193..200
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 202..209
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 211..218
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 220..227
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 244..251

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

          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 11 locations. Consider refactoring.
          Open

          test('+1y: Next year', patch_date(function(Date){
              Date.now = UTCDate(2012, 2, 15);
              this.input
                  .val('+1y')
                  .datepicker({format: 'dd-mm-yyyy'})
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 139..146
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 148..155
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 157..164
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 166..173
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 175..182
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 184..191
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 202..209
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 211..218
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 220..227
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 244..251

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

          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 11 locations. Consider refactoring.
          Open

          test('Regression: End-of-month bug', patch_date(function(Date){
              Date.now = UTCDate(2012, 4, 31);
              this.input
                  .val('29-02-2012')
                  .datepicker({format: 'dd-mm-yyyy'})
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 139..146
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 148..155
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 157..164
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 166..173
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 175..182
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 184..191
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 193..200
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 202..209
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 211..218
          core/static/vendor/bootstrap-datepicker/tests/suites/formats.js on lines 244..251

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

          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