webcol/Calima

View on GitHub
public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js

Summary

Maintainability
D
2 days
Test Coverage

Function editable has 235 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $.fn.editable = function(target, options) {

        if ('disable' == target) {
            $(this).data('disabled.editable', true);
            return;
Severity: Major
Found in public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js - About 1 day to fix

    File jquery.jeditable.js has 365 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Jeditable - jQuery in place edit plugin
     *
     * Copyright (c) 2006-2009 Mika Tuupola, Dylan Verheul
     *
    Severity: Minor
    Found in public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js - About 4 hrs to fix

      Function buttons has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                      buttons : function(settings, original) {
                          var form = this;
                          if (settings.submit) {
                              /* if given html string use that */
                              if (settings.submit.match(/>$/)) {

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

                            if (settings.cols) {
                                textarea.attr('cols', settings.cols);
                            } else if (settings.width != "none") {
                                textarea.width(settings.width);
                            }
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 471..475

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

        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 (settings.rows) {
                                textarea.attr('rows', settings.rows);
                            } else if (settings.height != "none") {
                                textarea.height(settings.height);
                            }
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 476..480

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

        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 (settings.height != 'none') {
                                settings.height =
                                    settings.autoheight ? $(self).height() : settings.height;
                            }
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 158..161

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

        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 (settings.width != 'none') {
                                settings.width =
                                    settings.autowidth ? $(self).width()  : settings.width;
                            }
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 162..165

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

        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

                var element  = $.editable.types[settings.type].element
                    || $.editable.types['defaults'].element;
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 85..86
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 87..88
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 91..92

        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

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

                var reset    = $.editable.types[settings.type].reset
                    || $.editable.types['defaults'].reset;
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 85..86
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 87..88
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 89..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 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

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

                var content  = $.editable.types[settings.type].content
                    || $.editable.types['defaults'].content;
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 85..86
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 89..90
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 91..92

        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

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

                var buttons  = $.editable.types[settings.type].buttons
                    || $.editable.types['defaults'].buttons;
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 87..88
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 89..90
        public_/plantillas/inspinia/js/plugins/jeditable/jquery.jeditable.js on lines 91..92

        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