bronycub/sugarcub

View on GitHub

Showing 3,238 of 3,238 total issues

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

        if (containerPos.x - dx - paddingTL.x < 0) { // left
            dx = containerPos.x - paddingTL.x;
        }
Severity: Minor
Found in core/static/vendor/leaflet/dist/leaflet-src.js and 1 other location - About 40 mins to fix
core/static/vendor/leaflet/dist/leaflet-src.js on lines 4092..4094

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

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

                    row.append('<td data-action="selectMinute" class="minute' + (!isValid(currentMinute, 'm') ? ' disabled' : '') + '">' + currentMinute.format('mm') + '</td>');
core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 811..811

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

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

                    row.append('<td data-action="selectSecond" class="second' + (!isValid(currentSecond, 's') ? ' disabled' : '') + '">' + currentSecond.format('ss') + '</td>');
core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 794..794

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

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

    _onLayerAdd: function (e) {
        if (e.layer.getAttribution) {
            this.addAttribution(e.layer.getAttribution());
        }
    },
Severity: Minor
Found in core/static/vendor/leaflet/dist/leaflet-src.js and 1 other location - About 40 mins to fix
core/static/vendor/leaflet/dist/leaflet-src.js on lines 8188..8192

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

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 (containerPos.y - dy - paddingTL.y < 0) { // top
            dy = containerPos.y - paddingTL.y;
        }
Severity: Minor
Found in core/static/vendor/leaflet/dist/leaflet-src.js and 1 other location - About 40 mins to fix
core/static/vendor/leaflet/dist/leaflet-src.js on lines 4086..4088

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

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

        this._zoomInButton  = this._createButton(
                this.options.zoomInText, this.options.zoomInTitle,
                zoomName + '-in',  container, this._zoomIn,  this);
Severity: Minor
Found in core/static/vendor/leaflet/dist/leaflet-src.js and 1 other location - About 40 mins to fix
core/static/vendor/leaflet/dist/leaflet-src.js on lines 8013..8015

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

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

    _onLayerRemove: function (e) {
        if (e.layer.getAttribution) {
            this.removeAttribution(e.layer.getAttribution());
        }
    }
Severity: Minor
Found in core/static/vendor/leaflet/dist/leaflet-src.js and 1 other location - About 40 mins to fix
core/static/vendor/leaflet/dist/leaflet-src.js on lines 8182..8186

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

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

    for (var i=0; i<2; i++)
        this.input.trigger({
            type: 'keydown',
            keyCode: 40
        });
core/static/vendor/bootstrap-datepicker/tests/suites/keyboard_navigation/2012.js on lines 45..49

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

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 getSetWeekYearHelper has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

function getSetWeekYearHelper(input, week, weekday, dow, doy) {
Severity: Minor
Found in core/static/vendor/moment/moment.js - About 35 mins to fix

    Function substituteTimeAgo has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
    Severity: Minor
    Found in core/static/vendor/moment/src/lib/duration/humanize.js - About 35 mins to fix

      Function getSetWeekYearHelper has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function getSetWeekYearHelper(input, week, weekday, dow, doy) {
      Severity: Minor
      Found in core/static/vendor/moment/src/lib/units/week-year.js - About 35 mins to fix

        Function dayOfYearFromWeeks has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        export function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
        Severity: Minor
        Found in core/static/vendor/moment/src/lib/units/week-calendar-utils.js - About 35 mins to fix

          Function createLocalOrUTC has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function createLocalOrUTC (input, format, locale, strict, isUTC) {
          Severity: Minor
          Found in core/static/vendor/moment/moment.js - About 35 mins to fix

            Function dayOfYearFromWeeks has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
            Severity: Minor
            Found in core/static/vendor/moment/moment.js - About 35 mins to fix

              Function createLocalOrUTC has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              export function createLocalOrUTC (input, format, locale, strict, isUTC) {
              Severity: Minor
              Found in core/static/vendor/moment/src/lib/create/from-anything.js - About 35 mins to fix

                Function setWeekAll has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                function setWeekAll(weekYear, week, weekday, dow, doy) {
                Severity: Minor
                Found in core/static/vendor/moment/src/lib/units/week-year.js - About 35 mins to fix

                  Function dayOfYearFromWeeks has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
                  Severity: Minor
                  Found in core/static/vendor/moment/min/moment-with-locales.js - About 35 mins to fix

                    Function substituteTimeAgo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
                    Severity: Minor
                    Found in core/static/vendor/moment/moment.js - About 35 mins to fix

                      Function substituteTimeAgo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
                      Severity: Minor
                      Found in core/static/vendor/moment/min/moment-with-locales.js - About 35 mins to fix

                        Function setWeekAll has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        function setWeekAll(weekYear, week, weekday, dow, doy) {
                        Severity: Minor
                        Found in core/static/vendor/moment/moment.js - About 35 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language