ochko/prudge

View on GitHub

Showing 206 of 206 total issues

Avoid deeply nested control flow statements.
Open

                        if ( selMatch[ sel ] ) {
                            matches.push( handleObj );
                        }
Severity: Major
Found in app/assets/javascripts/jquery.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                if ( matcher( elem, context, xml ) ) {
                                    elem.sizset = true;
                                    return elem;
                                }
    Severity: Major
    Found in app/assets/javascripts/jquery.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if ( conv && s["throws"] ) {
                              response = conv( response );
                          } else {
                              try {
                                  response = conv( response );
      Severity: Major
      Found in app/assets/javascripts/jquery.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                            if ( xhr.readyState !== 4 ) {
                                                xhr.abort();
                                            }
        Severity: Major
        Found in app/assets/javascripts/jquery.js - About 45 mins to fix

          Function setMatcher has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
          Severity: Minor
          Found in app/assets/javascripts/jquery.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    while ( className.indexOf(" " + removes[ c ] + " ") >= 0 ) {
                                        className = className.replace( " " + removes[ c ] + " " , " " );
                                    }
            Severity: Major
            Found in app/assets/javascripts/jquery.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
                                      contains( context, elem ) && elem.id === m ) {
                                      results.push( elem );
                                      return results;
                                  }
              Severity: Major
              Found in app/assets/javascripts/jquery.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                                    if ( xml && xml.documentElement /* #4958 */ ) {
                                                        responses.xml = xml;
                                                    }
                Severity: Major
                Found in app/assets/javascripts/jquery.js - About 45 mins to fix

                  Function init has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      init: function( elem, options, prop, end, easing, unit ) {
                  Severity: Minor
                  Found in app/assets/javascripts/jquery.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if ( (seed = find(
                                            token.matches[0].replace( rbackslash, "" ),
                                            rsibling.test( tokens[0].type ) && context.parentNode || context,
                                            xml
                                        )) ) {
                    Severity: Major
                    Found in app/assets/javascripts/jquery.js - About 45 mins to fix

                      Method perform has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                        def self.perform(id)
                          contest = Contest.find id
                      
                          User.where(notify_new_contests: true).each do |user|
                            next unless user.notify_new_contests?
                      Severity: Minor
                      Found in app/jobs/contest_opening_mail_job.rb - 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

                      Avoid deeply nested control flow statements.
                      Open

                                              if ( selMatch[ sel ] === undefined ) {
                                                  selMatch[ sel ] = handleObj.needsContext ?
                                                      jQuery( sel, this ).index( cur ) >= 0 :
                                                      jQuery.find( sel, this, null, [ cur ] ).length;
                                              }
                      Severity: Major
                      Found in app/assets/javascripts/jquery.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                        if ( elem === node ) {
                                                            break;
                                                        }
                        Severity: Major
                        Found in app/assets/javascripts/jquery.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

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

                            Avoid deeply nested control flow statements.
                            Open

                                                    if ( elem.id !== match[2] ) {
                                                        return rootjQuery.find( selector );
                                                    }
                            Severity: Major
                            Found in app/assets/javascripts/jquery.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if ( ret === false ) {
                                                          event.preventDefault();
                                                          event.stopPropagation();
                                                      }
                              Severity: Major
                              Found in app/assets/javascripts/jquery.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                    if ( xhrOnUnloadAbort ) {
                                                                        delete xhrCallbacks[ handle ];
                                                                    }
                                Severity: Major
                                Found in app/assets/javascripts/jquery.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                              if ( !xhrCallbacks ) {
                                                                  xhrCallbacks = {};
                                                                  jQuery( window ).unload( xhrOnUnloadAbort );
                                                              }
                                  Severity: Major
                                  Found in app/assets/javascripts/jquery.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                            for ( c = 0, cl = classNames.length; c < cl; c++ ) {
                                                                if ( setClass.indexOf( " " + classNames[ c ] + " " ) < 0 ) {
                                                                    setClass += classNames[ c ] + " ";
                                                                }
                                                            }
                                    Severity: Major
                                    Found in app/assets/javascripts/jquery.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                          if ( elem && elem.parentNode ) {
                                                              // Handle the case where IE, Opera, and Webkit return items
                                                              // by name instead of ID
                                                              if ( elem.id === m ) {
                                                                  results.push( elem );
                                      Severity: Major
                                      Found in app/assets/javascripts/jquery.js - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language