bronycub/sugarcub

View on GitHub

Showing 3,238 of 3,238 total issues

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

function toISOString () {
    var m = this.clone().utc();
    if (0 < m.year() && m.year() <= 9999) {
        if (isFunction(Date.prototype.toISOString)) {
            // native implementation is ~50x faster, use it when we can
Severity: Major
Found in core/static/vendor/moment/moment.js and 1 other location - About 4 hrs to fix
core/static/vendor/moment/min/moment-with-locales.js on lines 3118..3130

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

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 getText( elems ) {
    var ret = "", elem;

    for ( var i = 0; elems[i]; i++ ) {
        elem = elems[i];
core/static/vendor/jquery-expander/test/qunit/qunit.js on lines 1105..1122

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

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 toISOString () {
    var m = this.clone().utc();
    if (0 < m.year() && m.year() <= 9999) {
        if (isFunction(Date.prototype.toISOString)) {
            // native implementation is ~50x faster, use it when we can
Severity: Major
Found in core/static/vendor/moment/min/moment-with-locales.js and 1 other location - About 4 hrs to fix
core/static/vendor/moment/moment.js on lines 3124..3136

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

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

File 2012.js has 356 lines of code (exceeds 250 allowed). Consider refactoring.
Open

module('Keyboard Navigation 2012', {
    setup: function(){
        /*
            Tests start with picker on March 31, 2012.  Fun facts:

    Function parseDate has 113 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            parseDate: function (vDate, vFormat) {
                var self = this, vFormatParts, vDateParts, i, vDateFlag = false, vTimeFlag = false, vDatePart, iDatePart,
                    vSettings = self.dateSettings, vMonth, vMeriIndex, vMeriOffset, len, mer,
                    out = {date: null, year: null, month: null, day: null, hour: 0, min: 0, sec: 0};
                if (!vDate) {
    Severity: Major
    Found in core/static/vendor/datetimepicker/build/jquery.datetimepicker.full.js - About 4 hrs to fix

      Function diffCleanupMerge has 113 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          DiffMatchPatch.prototype.diffCleanupMerge = function( diffs ) {
              var pointer, countDelete, countInsert, textInsert, textDelete,
                  commonlength, changes, diffPointer, position;
              diffs.push( [ DIFF_EQUAL, "" ] ); // Add a dummy entry at the end.
              pointer = 0;
      Severity: Major
      Found in core/static/vendor/jquery-expander/test/qunit/qunit.1.19.0.js - About 4 hrs to fix

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

        ;(function($){
          $.fn.datepicker.dates['he'] = {
              days: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ראשון"],
              daysShort: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"],
              daysMin: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"],
        core/static/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.ar.js on lines 5..15

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

        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

        ;(function($){
            $.fn.datepicker.dates['ar'] = {
                days: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"],
                daysShort: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت", "أحد"],
                daysMin: ["ح", "ن", "ث", "ع", "خ", "ج", "س", "ح"],
        core/static/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.he.js on lines 5..15

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

        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

        export function to (time, withoutSuffix) {
            if (this.isValid() &&
                    ((isMoment(time) && time.isValid()) ||
                     createLocal(time).isValid())) {
                return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
        Severity: Major
        Found in core/static/vendor/moment/src/lib/moment/to.js and 1 other location - About 4 hrs to fix
        core/static/vendor/moment/src/lib/moment/from.js on lines 5..13

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

        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

        export function from (time, withoutSuffix) {
            if (this.isValid() &&
                    ((isMoment(time) && time.isValid()) ||
                     createLocal(time).isValid())) {
                return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
        Severity: Major
        Found in core/static/vendor/moment/src/lib/moment/from.js and 1 other location - About 4 hrs to fix
        core/static/vendor/moment/src/lib/moment/to.js on lines 5..13

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

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

                click: function(e){
                    e.preventDefault();
                    e.stopPropagation();
        
                    var target, dir, day, year, month, monthChanged, yearChanged;
        Severity: Major
        Found in core/static/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js - About 4 hrs to fix

          Function click has 112 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  click: function(e){
                      e.preventDefault();
                      e.stopPropagation();
          
                      var target, dir, day, year, month, monthChanged, yearChanged;

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

                        if (widgetPositioning.horizontal) {
                            if (typeof widgetPositioning.horizontal !== 'string') {
                                throw new TypeError('widgetPositioning() horizontal variable must be a string');
                            }
                            widgetPositioning.horizontal = widgetPositioning.horizontal.toLowerCase();
            core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 1989..1998

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

            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 (widgetPositioning.vertical) {
                            if (typeof widgetPositioning.vertical !== 'string') {
                                throw new TypeError('widgetPositioning() vertical variable must be a string');
                            }
                            widgetPositioning.vertical = widgetPositioning.vertical.toLowerCase();
            core/static/vendor/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 1979..1988

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

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

            function relativeTimeWithPlural(number, withoutSuffix, key) {
                var format = {
                    'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
                    'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
                    'dd': 'дзень_дні_дзён',
            Severity: Major
            Found in core/static/vendor/moment/locale/be.js and 7 other locations - About 4 hrs to fix
            core/static/vendor/moment/locale/uk.js on lines 18..35
            core/static/vendor/moment/min/locales.js on lines 659..676
            core/static/vendor/moment/min/locales.js on lines 7970..7987
            core/static/vendor/moment/min/moment-with-locales.js on lines 4949..4966
            core/static/vendor/moment/min/moment-with-locales.js on lines 12256..12273
            core/static/vendor/moment/src/locale/be.js on lines 13..30
            core/static/vendor/moment/src/locale/uk.js on lines 12..29

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

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

            function relativeTimeWithPlural(number, withoutSuffix, key) {
                var format = {
                    'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
                    'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
                    'dd': 'дзень_дні_дзён',
            Severity: Major
            Found in core/static/vendor/moment/src/locale/be.js and 7 other locations - About 4 hrs to fix
            core/static/vendor/moment/locale/be.js on lines 19..36
            core/static/vendor/moment/locale/uk.js on lines 18..35
            core/static/vendor/moment/min/locales.js on lines 659..676
            core/static/vendor/moment/min/locales.js on lines 7970..7987
            core/static/vendor/moment/min/moment-with-locales.js on lines 4949..4966
            core/static/vendor/moment/min/moment-with-locales.js on lines 12256..12273
            core/static/vendor/moment/src/locale/uk.js on lines 12..29

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

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

            function relativeTimeWithPlural$4(number, withoutSuffix, key) {
                var format = {
                    'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
                    'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
                    'dd': 'день_дні_днів',
            Severity: Major
            Found in core/static/vendor/moment/min/locales.js and 7 other locations - About 4 hrs to fix
            core/static/vendor/moment/locale/be.js on lines 19..36
            core/static/vendor/moment/locale/uk.js on lines 18..35
            core/static/vendor/moment/min/locales.js on lines 659..676
            core/static/vendor/moment/min/moment-with-locales.js on lines 4949..4966
            core/static/vendor/moment/min/moment-with-locales.js on lines 12256..12273
            core/static/vendor/moment/src/locale/be.js on lines 13..30
            core/static/vendor/moment/src/locale/uk.js on lines 12..29

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

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

            function relativeTimeWithPlural(number, withoutSuffix, key) {
                var format = {
                    'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
                    'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
                    'dd': 'день_дні_днів',
            Severity: Major
            Found in core/static/vendor/moment/src/locale/uk.js and 7 other locations - About 4 hrs to fix
            core/static/vendor/moment/locale/be.js on lines 19..36
            core/static/vendor/moment/locale/uk.js on lines 18..35
            core/static/vendor/moment/min/locales.js on lines 659..676
            core/static/vendor/moment/min/locales.js on lines 7970..7987
            core/static/vendor/moment/min/moment-with-locales.js on lines 4949..4966
            core/static/vendor/moment/min/moment-with-locales.js on lines 12256..12273
            core/static/vendor/moment/src/locale/be.js on lines 13..30

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

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

            function relativeTimeWithPlural(number, withoutSuffix, key) {
                var format = {
                    'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
                    'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
                    'dd': 'дзень_дні_дзён',
            Severity: Major
            Found in core/static/vendor/moment/min/moment-with-locales.js and 7 other locations - About 4 hrs to fix
            core/static/vendor/moment/locale/be.js on lines 19..36
            core/static/vendor/moment/locale/uk.js on lines 18..35
            core/static/vendor/moment/min/locales.js on lines 659..676
            core/static/vendor/moment/min/locales.js on lines 7970..7987
            core/static/vendor/moment/min/moment-with-locales.js on lines 12256..12273
            core/static/vendor/moment/src/locale/be.js on lines 13..30
            core/static/vendor/moment/src/locale/uk.js on lines 12..29

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

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

            function relativeTimeWithPlural(number, withoutSuffix, key) {
                var format = {
                    'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
                    'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
                    'dd': 'день_дні_днів',
            Severity: Major
            Found in core/static/vendor/moment/locale/uk.js and 7 other locations - About 4 hrs to fix
            core/static/vendor/moment/locale/be.js on lines 19..36
            core/static/vendor/moment/min/locales.js on lines 659..676
            core/static/vendor/moment/min/locales.js on lines 7970..7987
            core/static/vendor/moment/min/moment-with-locales.js on lines 4949..4966
            core/static/vendor/moment/min/moment-with-locales.js on lines 12256..12273
            core/static/vendor/moment/src/locale/be.js on lines 13..30
            core/static/vendor/moment/src/locale/uk.js on lines 12..29

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

            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