moment/moment

View on GitHub
locale/ar-sa.js

Summary

Maintainability
D
2 days
Test Coverage

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

    var arSa = moment.defineLocale('ar-sa', {
        months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
            '_'
        ),
        monthsShort:
Severity: Major
Found in locale/ar-sa.js and 2 other locations - About 2 days to fix
min/locales.js on lines 633..706
src/locale/ar-sa.js on lines 32..105

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

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

    var symbolMap = {
            1: '١',
            2: '٢',
            3: '٣',
            4: '٤',
Severity: Major
Found in locale/ar-sa.js and 27 other locations - About 4 hrs to fix
locale/ar-ps.js on lines 14..37
locale/bn-bd.js on lines 14..37
locale/bn.js on lines 14..37
locale/bo.js on lines 14..37
locale/fa.js on lines 14..37
locale/gu.js on lines 14..37
locale/km.js on lines 14..37
locale/kn.js on lines 14..37
locale/mr.js on lines 15..38
locale/my.js on lines 16..39
locale/ne.js on lines 14..37
locale/pa-in.js on lines 14..37
locale/ta.js on lines 14..37
min/locales.js on lines 499..522
min/locales.js on lines 608..631
min/locales.js on lines 1314..1337
min/locales.js on lines 1440..1463
min/locales.js on lines 1556..1579
min/locales.js on lines 4021..4044
min/locales.js on lines 5174..5197
min/locales.js on lines 6661..6684
min/locales.js on lines 6761..6784
min/locales.js on lines 8097..8120
min/locales.js on lines 8493..8516
min/locales.js on lines 8634..8657
min/locales.js on lines 9087..9110
min/locales.js on lines 10750..10773

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

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

There are no issues that match your filters.

Category
Status