XoopsModules25x/apcal

View on GitHub
assets/js/jscalendar/lang/calendar-bg.js

Summary

Maintainability
A
2 hrs
Test Coverage

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

Calendar._TT["ABOUT"] =
    "DHTML Date/Time Selector\n" +
    "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
    "For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
    "Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +
Severity: Major
Found in assets/js/jscalendar/lang/calendar-bg.js and 28 other locations - About 2 hrs to fix
assets/js/jscalendar/lang/calendar-big5-utf8.js on lines 80..89
assets/js/jscalendar/lang/calendar-big5.js on lines 80..89
assets/js/jscalendar/lang/calendar-ca.js on lines 80..89
assets/js/jscalendar/lang/calendar-de.js on lines 80..89
assets/js/jscalendar/lang/calendar-el.js on lines 54..63
assets/js/jscalendar/lang/calendar-en.js on lines 84..93
assets/js/jscalendar/lang/calendar-es.js on lines 86..95
assets/js/jscalendar/lang/calendar-fi.js on lines 64..73
assets/js/jscalendar/lang/calendar-fr.js on lines 82..91
assets/js/jscalendar/lang/calendar-hu.js on lines 81..90
assets/js/jscalendar/lang/calendar-it.js on lines 81..90
assets/js/jscalendar/lang/calendar-lt-utf8.js on lines 80..89
assets/js/jscalendar/lang/calendar-lt.js on lines 80..89
assets/js/jscalendar/lang/calendar-lv.js on lines 80..89
assets/js/jscalendar/lang/calendar-no.js on lines 80..89
assets/js/jscalendar/lang/calendar-pl-utf8.js on lines 58..67
assets/js/jscalendar/lang/calendar-pl.js on lines 22..31
assets/js/jscalendar/lang/calendar-pt.js on lines 80..89
assets/js/jscalendar/lang/calendar-ro.js on lines 31..40
assets/js/jscalendar/lang/calendar-ru.js on lines 80..89
assets/js/jscalendar/lang/calendar-ru_win_.js on lines 80..89
assets/js/jscalendar/lang/calendar-si.js on lines 60..69
assets/js/jscalendar/lang/calendar-sp.js on lines 67..76
assets/js/jscalendar/lang/calendar-sv.js on lines 59..68
assets/js/jscalendar/lang/calendar-tw-utf8.js on lines 80..89
assets/js/jscalendar/lang/calendar-tw.js on lines 80..89
assets/js/jscalendar/lang/calendar-zh.js on lines 76..85
assets/js/jscalendar/lang/cn_utf8.js on lines 81..90

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

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

Calendar._DN = new Array
("Неделя",
    "Понеделник",
    "Вторник",
    "Сряда",
Severity: Major
Found in assets/js/jscalendar/lang/calendar-bg.js and 3 other locations - About 35 mins to fix
assets/js/jscalendar/lang/calendar-fr.js on lines 15..23
assets/js/jscalendar/lang/calendar-hu.js on lines 14..22
assets/js/jscalendar/lang/calendar-it.js on lines 14..22

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

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