mambax7/alumni-26x

View on GitHub
media/jquery/tablesorter-master/js/parsers/parser-input-select.js

Summary

Maintainability
C
1 day
Test Coverage

File parser-input-select.js has 273 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! Parser: input & select - updated 5/16/2017 (v2.28.10) *//*
 * for jQuery 1.7+ & tablesorter 2.7.11+
 * Demo: http://mottie.github.com/tablesorter/docs/example-widget-grouping.html
 */
/*jshint browser: true, jquery:true, unused:false */
Severity: Minor
Found in media/jquery/tablesorter-master/js/parsers/parser-input-select.js - About 2 hrs to fix

    Consider simplifying this complex logical expression.
    Open

                    if ( event.type === 'change' ||
                        ( event.type === 'keyup' && event.which === 13 &&
                        ( event.target.nodeName === 'INPUT' || event.target.nodeName === 'TEXTAREA' && event.altKey ) ) ) {
                        var undef, checkboxClass,
                            $target = $( event.target ),
    Severity: Critical
    Found in media/jquery/tablesorter-master/js/parsers/parser-input-select.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                          if ( $hdr.length && ( $hdr.hasClass( 'parser-false' ) ||
                              ( $hdr.hasClass( 'sorter-false' ) && $hdr.hasClass( 'filter-false' ) ) ) ||
                              // table already updating; get out of here, we might be in an endless loop (in IE)! See #971
                              ( event.type === 'change' && c.table.isUpdating ) ) {
                              return;
      Severity: Major
      Found in media/jquery/tablesorter-master/js/parsers/parser-input-select.js - About 40 mins to fix

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

            $.tablesorter.addParser({
                id : 'select',
                is : function() {
                    return false;
                },
        media/jquery/tablesorter-master/js/parsers/parser-input-select.js on lines 100..111

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

        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

            $.tablesorter.addParser({
                id : 'textarea',
                is : function() {
                    return false;
                },
        media/jquery/tablesorter-master/js/parsers/parser-input-select.js on lines 71..82

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

        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