webcol/Calima

View on GitHub
public_/js/bootstrap-confirmation.js

Summary

Maintainability
F
3 days
Test Coverage

Function Confirmation has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var Confirmation = function (element, options) {
        var that = this;

        this.init('confirmation', element, options);

Severity: Minor
Found in public_/js/bootstrap-confirmation.js - About 1 hr to fix

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

        Confirmation.prototype.getBtnOkIcon = function () {
            var $e = this.$element;
            var o  = this.options;
    
            return $e.attr('data-btnOkIcon') || (typeof o.btnOkIcon == 'function' ?  o.btnOkIcon.call($e[0]) : o.btnOkIcon);
    Severity: Major
    Found in public_/js/bootstrap-confirmation.js and 9 other locations - About 2 hrs to fix
    public_/js/bootstrap-confirmation.js on lines 140..145
    public_/js/bootstrap-confirmation.js on lines 147..152
    public_/js/bootstrap-confirmation.js on lines 161..166
    public_/js/bootstrap-confirmation.js on lines 168..173
    public_/js/bootstrap-confirmation.js on lines 175..180
    public_/js/bootstrap-confirmation.js on lines 182..187
    public_/js/bootstrap-confirmation.js on lines 189..194
    public_/js/bootstrap.js on lines 1772..1780
    public_/plantillas/inspinia/js/bootstrap.js on lines 1841..1849

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

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

        Confirmation.prototype.getBtnCancelClass = function () {
            var $e = this.$element;
            var o  = this.options;
    
            return $e.attr('data-btnCancelClass') || (typeof o.btnCancelClass == 'function' ? o.btnCancelClass.call($e[0]) : o.btnCancelClass);
    Severity: Major
    Found in public_/js/bootstrap-confirmation.js and 9 other locations - About 2 hrs to fix
    public_/js/bootstrap-confirmation.js on lines 140..145
    public_/js/bootstrap-confirmation.js on lines 147..152
    public_/js/bootstrap-confirmation.js on lines 154..159
    public_/js/bootstrap-confirmation.js on lines 168..173
    public_/js/bootstrap-confirmation.js on lines 175..180
    public_/js/bootstrap-confirmation.js on lines 182..187
    public_/js/bootstrap-confirmation.js on lines 189..194
    public_/js/bootstrap.js on lines 1772..1780
    public_/plantillas/inspinia/js/bootstrap.js on lines 1841..1849

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

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

        Confirmation.prototype.getBtnOkClass = function () {
            var $e = this.$element;
            var o  = this.options;
    
            return $e.attr('data-btnOkClass') || (typeof o.btnOkClass == 'function' ? o.btnOkClass.call($e[0]) : o.btnOkClass);
    Severity: Major
    Found in public_/js/bootstrap-confirmation.js and 9 other locations - About 2 hrs to fix
    public_/js/bootstrap-confirmation.js on lines 147..152
    public_/js/bootstrap-confirmation.js on lines 154..159
    public_/js/bootstrap-confirmation.js on lines 161..166
    public_/js/bootstrap-confirmation.js on lines 168..173
    public_/js/bootstrap-confirmation.js on lines 175..180
    public_/js/bootstrap-confirmation.js on lines 182..187
    public_/js/bootstrap-confirmation.js on lines 189..194
    public_/js/bootstrap.js on lines 1772..1780
    public_/plantillas/inspinia/js/bootstrap.js on lines 1841..1849

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

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

        Confirmation.prototype.getBtnOkLabel = function () {
            var $e = this.$element;
            var o  = this.options;
    
            return $e.attr('data-btnOkLabel') || (typeof o.btnOkLabel == 'function' ? o.btnOkLabel.call($e[0]) : o.btnOkLabel);
    Severity: Major
    Found in public_/js/bootstrap-confirmation.js and 9 other locations - About 2 hrs to fix
    public_/js/bootstrap-confirmation.js on lines 140..145
    public_/js/bootstrap-confirmation.js on lines 154..159
    public_/js/bootstrap-confirmation.js on lines 161..166
    public_/js/bootstrap-confirmation.js on lines 168..173
    public_/js/bootstrap-confirmation.js on lines 175..180
    public_/js/bootstrap-confirmation.js on lines 182..187
    public_/js/bootstrap-confirmation.js on lines 189..194
    public_/js/bootstrap.js on lines 1772..1780
    public_/plantillas/inspinia/js/bootstrap.js on lines 1841..1849

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

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

        Confirmation.prototype.getBtnCancelLabel = function () {
            var $e = this.$element;
            var o  = this.options;
    
            return $e.attr('data-btnCancelLabel') || (typeof o.btnCancelLabel == 'function' ? o.btnCancelLabel.call($e[0]) : o.btnCancelLabel);
    Severity: Major
    Found in public_/js/bootstrap-confirmation.js and 9 other locations - About 2 hrs to fix
    public_/js/bootstrap-confirmation.js on lines 140..145
    public_/js/bootstrap-confirmation.js on lines 147..152
    public_/js/bootstrap-confirmation.js on lines 154..159
    public_/js/bootstrap-confirmation.js on lines 161..166
    public_/js/bootstrap-confirmation.js on lines 175..180
    public_/js/bootstrap-confirmation.js on lines 182..187
    public_/js/bootstrap-confirmation.js on lines 189..194
    public_/js/bootstrap.js on lines 1772..1780
    public_/plantillas/inspinia/js/bootstrap.js on lines 1841..1849

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

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

        Confirmation.prototype.getBtnCancelIcon = function () {
            var $e = this.$element;
            var o  = this.options;
    
            return $e.attr('data-btnCancelIcon') || (typeof o.btnCancelIcon == 'function' ? o.btnCancelIcon.call($e[0]) : o.btnCancelIcon);
    Severity: Major
    Found in public_/js/bootstrap-confirmation.js and 9 other locations - About 2 hrs to fix
    public_/js/bootstrap-confirmation.js on lines 140..145
    public_/js/bootstrap-confirmation.js on lines 147..152
    public_/js/bootstrap-confirmation.js on lines 154..159
    public_/js/bootstrap-confirmation.js on lines 161..166
    public_/js/bootstrap-confirmation.js on lines 168..173
    public_/js/bootstrap-confirmation.js on lines 182..187
    public_/js/bootstrap-confirmation.js on lines 189..194
    public_/js/bootstrap.js on lines 1772..1780
    public_/plantillas/inspinia/js/bootstrap.js on lines 1841..1849

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

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

        Confirmation.prototype.getTarget = function () {
            var $e = this.$element;
            var o  = this.options;
    
            return $e.attr('data-target') || (typeof o.target == 'function' ? o.target.call($e[0]) : o.target);
    Severity: Major
    Found in public_/js/bootstrap-confirmation.js and 9 other locations - About 2 hrs to fix
    public_/js/bootstrap-confirmation.js on lines 140..145
    public_/js/bootstrap-confirmation.js on lines 147..152
    public_/js/bootstrap-confirmation.js on lines 154..159
    public_/js/bootstrap-confirmation.js on lines 161..166
    public_/js/bootstrap-confirmation.js on lines 168..173
    public_/js/bootstrap-confirmation.js on lines 175..180
    public_/js/bootstrap-confirmation.js on lines 182..187
    public_/js/bootstrap.js on lines 1772..1780
    public_/plantillas/inspinia/js/bootstrap.js on lines 1841..1849

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

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

        Confirmation.prototype.getHref = function () {
            var $e = this.$element;
            var o  = this.options;
    
            return $e.attr('data-href') || (typeof o.href == 'function' ? o.href.call($e[0]) : o.href);
    Severity: Major
    Found in public_/js/bootstrap-confirmation.js and 9 other locations - About 2 hrs to fix
    public_/js/bootstrap-confirmation.js on lines 140..145
    public_/js/bootstrap-confirmation.js on lines 147..152
    public_/js/bootstrap-confirmation.js on lines 154..159
    public_/js/bootstrap-confirmation.js on lines 161..166
    public_/js/bootstrap-confirmation.js on lines 168..173
    public_/js/bootstrap-confirmation.js on lines 175..180
    public_/js/bootstrap-confirmation.js on lines 189..194
    public_/js/bootstrap.js on lines 1772..1780
    public_/plantillas/inspinia/js/bootstrap.js on lines 1841..1849

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

    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

            $btnCancel.addClass(this.getBtnCancelClass())
                .html(this.getBtnCancelLabel())
                .prepend($('<i></i>').addClass(this.getBtnCancelIcon()), " ")
                .off('click').on('click', function(event){
    Severity: Major
    Found in public_/js/bootstrap-confirmation.js and 1 other location - About 1 hr to fix
    public_/js/bootstrap-confirmation.js on lines 111..114

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

    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

            $btnOk.addClass(this.getBtnOkClass())
                .html(this.getBtnOkLabel())
                .prepend($('<i></i>').addClass(this.getBtnOkIcon()), " ")
                .attr('href', this.getHref())
    Severity: Major
    Found in public_/js/bootstrap-confirmation.js and 1 other location - About 1 hr to fix
    public_/js/bootstrap-confirmation.js on lines 122..125

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

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

        $.fn.confirmation.noConflict = function () {
            $.fn.confirmation = old;
    
            return this;
        }
    Severity: Major
    Found in public_/js/bootstrap-confirmation.js and 4 other locations - About 30 mins to fix
    public_/js/bootstrap.js on lines 1702..1705
    public_/js/bootstrap.js on lines 1822..1825
    public_/plantillas/inspinia/js/bootstrap.js on lines 1771..1774
    public_/plantillas/inspinia/js/bootstrap.js on lines 1880..1883

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

    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