YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/Vtiger/resources/Export.js

Summary

Maintainability
A
35 mins
Test Coverage

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

        getForm: function () {
            if (this.exportForm == false) {
                this.exportForm = jQuery('#exportForm');
            }
            return this.exportForm;
Severity: Major
Found in public_html/layouts/basic/modules/Vtiger/resources/Export.js and 20 other locations - About 35 mins to fix
public_html/layouts/basic/modules/Project/resources/GanttController.js on lines 9..14
public_html/layouts/basic/modules/Settings/AutomaticAssignment/resources/Edit.js on lines 15..20
public_html/layouts/basic/modules/Settings/AutomaticAssignment/resources/List.js on lines 30..35
public_html/layouts/basic/modules/Settings/BruteForce/resources/Index.js on lines 9..14
public_html/layouts/basic/modules/Settings/CustomView/resources/Index.js on lines 170..175
public_html/layouts/basic/modules/Settings/Notifications/resources/Configuration.js on lines 98..103
public_html/layouts/basic/modules/Settings/PickListDependency/resources/List.js on lines 28..33
public_html/layouts/basic/modules/Settings/RecordNumbering/resources/Index.js on lines 10..15
public_html/layouts/basic/modules/Vtiger/resources/Detail.js on lines 578..583
public_html/layouts/basic/modules/Vtiger/resources/Inventory.js on lines 73..78
public_html/layouts/basic/modules/Vtiger/resources/Inventory.js on lines 79..84
public_html/layouts/basic/modules/Vtiger/resources/Inventory.js on lines 85..90
public_html/layouts/basic/modules/Vtiger/resources/Inventory.js on lines 91..96
public_html/layouts/basic/modules/Vtiger/resources/List.js on lines 495..500
public_html/layouts/basic/modules/Vtiger/resources/List.js on lines 501..506
public_html/layouts/basic/modules/Vtiger/resources/List.js on lines 507..512
public_html/layouts/basic/modules/Vtiger/resources/List.js on lines 524..529
public_html/layouts/basic/modules/Vtiger/resources/RelatedList.js on lines 266..271
public_html/layouts/basic/modules/Vtiger/resources/TreeCategoryModal.js on lines 12..17
public_html/layouts/basic/modules/Vtiger/resources/TreeRecords.js on lines 11..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 47.

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