YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/Settings/CustomView/resources/Index.js

Summary

Maintainability
C
7 hrs
Test Coverage

Function registerFilterChange has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        registerFilterChange: function (e) {
            var thisInstance = this;
            var aDeferred = $.Deferred();
            var progress = $.progressIndicator({
                message: app.vtranslate('JS_LOADING_PLEASE_WAIT'),

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

                        jQuery(this).sortable({
                            containment: 'tbody',
                            revert: true,
                            tolerance: 'pointer',
                            cursor: 'move',
    public_html/layouts/basic/modules/Settings/Search/resources/Search.js on lines 120..140

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

    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

            getContents: function () {
                if (this.contents == false) {
                    this.contents = this.getContainer().find('.indexContents');
                }
                return this.contents;
    public_html/layouts/basic/modules/Vtiger/resources/dashboards/Widget.js on lines 2539..2544

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

    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

                app.saveAjax('upadteSequences', sequences).done(function (data) {
                    if (data.success) {
                        app.showNotify({ text: data.result.message, type: 'success' });
                    }
                });
    public_html/layouts/basic/modules/Settings/OSSMailScanner/resources/Index.js on lines 126..133

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

            getContainer: function () {
                if (this.container == false) {
                    this.container = jQuery('div.contentsDiv');
                }
                return this.container;
    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/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/Export.js on lines 9..14
    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