3den/riotjs-todomvc

View on GitHub

Showing 116 of 130 total issues

Function off has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    off: function( types, selector, fn ) {
        var handleObj, type;
        if ( types && types.preventDefault && types.handleObj ) {
            // ( event )  dispatched jQuery.Event
            handleObj = types.handleObj;
Severity: Minor
Found in bower_components/jquery/dist/jquery.js - About 1 hr to fix

    Function * has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            "*": [ function( prop, value ) {
                var tween = this.createTween( prop, value ),
                    target = tween.cur(),
                    parts = rfxnum.exec( value ),
                    unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
    Severity: Minor
    Found in bower_components/jquery/dist/jquery.js - About 1 hr to fix

      Function offset has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          offset: function( options ) {
              if ( arguments.length ) {
                  return options === undefined ?
                      this :
                      this.each(function( i ) {
      Severity: Minor
      Found in bower_components/jquery/dist/jquery.js - About 1 hr to fix

        Function Learn has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function Learn(learnJSON, config) {
                if (!(this instanceof Learn)) {
                    return new Learn(learnJSON, config);
                }
        
        
        Severity: Minor
        Found in bower_components/todomvc-common/base.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

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

            Function Todo has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

            function Todo() {
                var self = riot.observable(this),
                    db = DB('riot-todo'),
                    items = db.get();
            
            
            Severity: Minor
            Found in js/models/todo.js - About 55 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

            Function access has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
            Severity: Major
            Found in bower_components/jquery/dist/jquery.js - About 50 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 bower_components/jquery/dist/jquery.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                } else if ( copy !== undefined ) {
                                    target[ name ] = copy;
                                }
                Severity: Major
                Found in bower_components/jquery/dist/jquery.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 bower_components/jquery/dist/jquery.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 bower_components/jquery/dist/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 bower_components/jquery/dist/jquery.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if ( hasScripts ) {
                                                    // Support: QtWebKit
                                                    // jQuery.merge because push.apply(_, arraylike) throws
                                                    jQuery.merge( scripts, getAll( node, "script" ) );
                                                }
                        Severity: Major
                        Found in bower_components/jquery/dist/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 bower_components/jquery/dist/jquery.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
                                                        cur += clazz + " ";
                                                    }
                            Severity: Major
                            Found in bower_components/jquery/dist/jquery.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 bower_components/jquery/dist/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 bower_components/jquery/dist/jquery.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

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

                                    Avoid deeply nested control flow statements.
                                    Open

                                                        if ( copyIsArray ) {
                                                            copyIsArray = false;
                                                            clone = src && jQuery.isArray(src) ? src : [];
                                    
                                                        } else {
                                    Severity: Major
                                    Found in bower_components/jquery/dist/jquery.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 bower_components/jquery/dist/jquery.js - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language