jacquev6/variadic

View on GitHub

Showing 201 of 201 total issues

Avoid deeply nested control flow statements.
Open

                    if ( Expr.relative[ tokens[j].type ] ) {
                        break;
                    }
Severity: Major
Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                if (!allfound) {
                  continue;
                }
    Severity: Major
    Found in docs/_static/searchtools.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if ( restoreDisplay == null ) {
                              display = style.display;
                              restoreDisplay = display === "none" ? "" : display;
                          }
      Severity: Major
      Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                for ( type in data.events ) {
                                    if ( special[ type ] ) {
                                        jQuery.event.remove( elem, type );
        
                                    // This is a shortcut to avoid jQuery.event.remove's overhead
        Severity: Major
        Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if ( nodeType === 9 ) {
                                  if ( (elem = context.getElementById( m )) ) {
          
                                      // Support: IE, Opera, Webkit
                                      // TODO: identify versions
          Severity: Major
          Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if ( attrs[ i ] ) {
                                        name = attrs[ i ].name;
                                        if ( name.indexOf( "data-" ) === 0 ) {
                                            name = jQuery.camelCase( name.slice( 5 ) );
                                            dataAttr( elem, name, data[ name ] );
            Severity: Major
            Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if ( (nid = context.getAttribute( "id" )) ) {
                                      nid = nid.replace( rcssescape, fcssescape );
                                  } else {
                                      context.setAttribute( "id", (nid = expando) );
                                  }
              Severity: Major
              Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    while ( i-- ) {
                                        groups[i] = "#" + nid + " " + toSelector( groups[i] );
                                    }
                Severity: Major
                Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if ( (elem = matcherOut[i]) ) {
                                              // Restore matcherIn since elem is not yet a final match
                                              temp.push( (matcherIn[i] = elem) );
                                          }
                  Severity: Major
                  Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

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

                              case 39: // right
                                var nextHref = $('link[rel="next"]').prop('href');
                                if (nextHref) {
                                  window.location.href = nextHref;
                                  return false;
                    Severity: Minor
                    Found in docs/_static/doctools.js and 1 other location - About 45 mins to fix
                    docs/_static/doctools.js on lines 292..297

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

                    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

                              case 37: // left
                                var prevHref = $('link[rel="prev"]').prop('href');
                                if (prevHref) {
                                  window.location.href = prevHref;
                                  return false;
                    Severity: Minor
                    Found in docs/_static/doctools.js and 1 other location - About 45 mins to fix
                    docs/_static/doctools.js on lines 298..303

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

                    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

                    Function splitQuery has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function splitQuery(query) {
                        var result = [];
                        var start = -1;
                        for (var i = 0; i < query.length; i++) {
                            if (splitChars[query.charCodeAt(i)]) {
                    Severity: Minor
                    Found in docs/_static/documentation_options.js - About 45 mins to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Consider simplifying this complex logical expression.
                    Open

                            if (terms[excluded[i]] == file ||
                                titleterms[excluded[i]] == file ||
                                $u.contains(terms[excluded[i]] || [], file) ||
                                $u.contains(titleterms[excluded[i]] || [], file)) {
                              valid = false;
                    Severity: Major
                    Found in docs/_static/searchtools.js - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                                  if ( matcher[ expando ] ) {
                                      // Find the next relative operator (if any) for proper handling
                                      j = ++i;
                                      for ( ; j < len; j++ ) {
                                          if ( Expr.relative[ tokens[j].type ] ) {
                      Severity: Major
                      Found in docs/_static/jquery-3.2.1.js - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                        context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
                        
                                    context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
                                    if ( !context ) {
                        Severity: Major
                        Found in docs/_static/jquery-3.2.1.js - About 40 mins to fix

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

                              def test_name_is_preserved(self):
                                  self.assertEqual(self.f.__name__, "f")
                                  self.assertEqual(self.g.__name__, "g")
                          Severity: Minor
                          Found in variadic.py and 1 other location - About 40 mins to fix
                          variadic.py on lines 251..253

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

                          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

                              def test_doc_is_preserved(self):
                                  self.assertEqual(self.f.__doc__, "f's doc")
                                  self.assertEqual(self.g.__doc__, "g's doc")
                          Severity: Minor
                          Found in variadic.py and 1 other location - About 40 mins to fix
                          variadic.py on lines 247..249

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

                          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

                                          for ( i = 0, l = srcElements.length; i < l; i++ ) {
                                              cloneCopyEvent( srcElements[ i ], destElements[ i ] );
                                          }
                          Severity: Minor
                          Found in docs/_static/jquery-3.2.1.js and 1 other location - About 40 mins to fix
                          docs/_static/jquery-3.2.1.js on lines 5838..5840

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

                                      for ( i = 0, l = srcElements.length; i < l; i++ ) {
                                          fixInput( srcElements[ i ], destElements[ i ] );
                                      }
                          Severity: Minor
                          Found in docs/_static/jquery-3.2.1.js and 1 other location - About 40 mins to fix
                          docs/_static/jquery-3.2.1.js on lines 5849..5851

                          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

                          Function add has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              add: function( elem, types, handler, data, selector ) {
                          Severity: Minor
                          Found in docs/_static/jquery-3.2.1.js - About 35 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language