rosedu/wouso

View on GitHub

Showing 551 of 2,707 total issues

Avoid deeply nested control flow statements.
Open

                                if ( !status && options.isLocal && !options.crossDomain ) {
                                    status = responses.text ? 200 : 404;
                                // IE - #1450: sometimes returns 1223 when it should be 204
                                } else if ( status === 1223 ) {
                                    status = 204;
Severity: Major
Found in wouso/resources/static/js/jquery-1.11.1.min.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if ( hasScripts ) {
                                jQuery.merge( scripts, getAll( node, "script" ) );
                            }
    Severity: Major
    Found in wouso/resources/static/js/jquery-1.11.1.min.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          for ( conv2 in converters ) {
      
                              // If conv2 outputs current
                              tmp = conv2.split( " " );
                              if ( tmp[ 1 ] === current ) {
      Severity: Major
      Found in wouso/resources/static/js/jquery-1.11.1.min.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                        if ( xhr.readyState !== 4 ) {
                                            xhr.abort();
                                        }
        Severity: Major
        Found in wouso/resources/static/js/jquery-1.11.1.min.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 wouso/resources/static/js/jquery-1.11.1.min.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if ( !selector ) {
                                    push.apply( results, seed );
                                    return results;
                                }
            Severity: Major
            Found in wouso/resources/static/js/jquery-1.11.1.min.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if ( typeof xhr.responseText === "string" ) {
                                                  responses.text = xhr.responseText;
                                              }
              Severity: Major
              Found in wouso/resources/static/js/jquery-1.11.1.min.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 wouso/resources/static/js/jquery-1.11.1.min.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                              if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
                                                  return true;
                                              }
                  Severity: Major
                  Found in wouso/resources/static/js/jquery-1.11.1.min.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            for ( var fn in timers[label] ) {
                                                window.clearInterval(timers[label][fn]);
                                                delete timers[label][fn];
                                            }
                    Severity: Major
                    Found in wouso/resources/static/js/jquery.timers.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                      if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
                                                          // Cache the index of each encountered element
                                                          if ( useCache ) {
                                                              (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
                                                          }
                      Severity: Major
                      Found in wouso/resources/static/js/jquery-1.11.1.min.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
                                                    cur += clazz + " ";
                                                }
                        Severity: Major
                        Found in wouso/resources/static/js/jquery-1.11.1.min.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if ( fn.$timerID ) {
                                                      window.clearInterval(timers[label][fn.$timerID]);
                                                      delete timers[label][fn.$timerID];
                                                  }
                          Severity: Major
                          Found in wouso/resources/static/js/jquery.timers.js - About 45 mins to fix

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

                                def process_request(self, request):
                                    if not hasattr(request, 'user') or not hasattr(request, 'session'):
                                        return
                                    real_user = request.user
                                    impersonated_id = self.get_impersonation(request)
                            Severity: Minor
                            Found in wouso/middleware/impersonation.py - 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 ( Expr.relative[ tokens[j].type ] ) {
                                                    break;
                                                }
                            Severity: Major
                            Found in wouso/resources/static/js/jquery-1.11.1.min.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      for ( match in context ) {
                                                          // Properties of context are called as methods if possible
                                                          if ( jQuery.isFunction( this[ match ] ) ) {
                                                              this[ match ]( context[ match ] );
                              
                              
                              Severity: Major
                              Found in wouso/resources/static/js/jquery-1.11.1.min.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                    if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
                                                                        return false;
                                                                    }
                                Severity: Major
                                Found in wouso/resources/static/js/jquery-1.11.1.min.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                              if ( !(unmatched[i] || setMatched[i]) ) {
                                                                  setMatched[i] = pop.call( results );
                                                              }
                                  Severity: Major
                                  Found in wouso/resources/static/js/jquery-1.11.1.min.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 wouso/resources/static/js/jquery-1.11.1.min.js - About 45 mins to fix

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

                                      def add_user_no_matter_what(username, first_name, last_name, email, password, cookie):
                                      Severity: Minor
                                      Found in wouso/utils/add_users_force_to_race.py - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language