talho/openphin

View on GitHub
app/assets/javascripts/lib/dominoes-1.0-rc2.js

Summary

Maintainability
F
3 days
Test Coverage

File dominoes-1.0-rc2.js has 549 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Dominoes v.1.0 (rc2) [2/3/10 01:04:06.934 - CET]
 * Copyright 2010, Julian Aubourg
 * Dual licensed under the MIT and GPL Version 2 licenses
 */
Severity: Major
Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 1 day to fix

    Function execute has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function execute( item , context , thread , callback ) {
        
        var url,
            length;
        
    Severity: Major
    Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 2 hrs to fix

      Function functor has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          functor = dominoes.functor = dataHolder( function( _id , func ) {
          
              var parts = /^([^$()]+)(?:\(([|SOF+]*)\))?$/.exec( _id );
              
              if ( parts ) {
      Severity: Minor
      Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 1 hr to fix

        Function parseChain has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function parseChain( chain ) {
            
            chain = chain.split( R_DELIM );
            
            var i = 0,
        Severity: Minor
        Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 1 hr to fix

          Function parseStringItem has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function parseStringItem( string , context , thread ) {
          
              var done,
                  func,
                  data = {},
          Severity: Minor
          Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 1 hr to fix

            Function loader has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function loader( loadFunction ) {
                
                var loaded = {},
                    loading = {};
            
            
            Severity: Minor
            Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 1 hr to fix

              Function id has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                                  functor = functors[ id ] = functors[ id ] || function( _data , thread ) {
                                      
                                      var data = _data,
                                          context = this;
                  
              Severity: Minor
              Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 1 hr to fix

                Function rule has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var rule = dominoes.rule = dataHolder( function( id ) {
                
                    var rules = this,
                        running = FALSE,
                        callbacks = [],
                Severity: Minor
                Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 1 hr to fix

                  Avoid deeply nested control flow statements.
                  Open

                              if ( item[ STR_CALL ]( context , callback , thread ) !== FALSE ) {
                                  callback();
                              }
                  Severity: Major
                  Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                    if ( isString( item ) ) {
                                        
                                        item = {
                                            url: url
                                        };
                    Severity: Major
                    Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                              } else if ( isArray( item ) && ( length = item[ STR_LENGTH ] ) ) {
                                  
                                  if ( item.P ) {
                                      
                                      var i = 0,
                      Severity: Major
                      Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if ( ! --cssPollingNb ) {
                                                    return FALSE;
                                                }
                        Severity: Major
                        Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                          if ( item === SYM_WAIT || item === SYM_READY ) {
                                              
                                              if ( item === SYM_READY ) {
                                                  current[ STR_PUSH ]( ready );
                                              }
                          Severity: Major
                          Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                        if ( subFunctors[ STR_PLUS ] && isString( data ) ) {
                                                            
                                                            if ( subFunctors[ STR_PLUS ] !== plus ) {
                                                                plus = subFunctors[ STR_PLUS ];
                                                                accu = accumulator( plus );
                            Severity: Major
                            Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 45 mins to fix

                              Consider simplifying this complex logical expression.
                              Open

                              if ( ! window[ STR_DOMINOES ] )
                                      
                              (function(
                                  STR_ASYNC,
                                  STR_CACHE,
                              Severity: Major
                              Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 40 mins to fix

                                There are no issues that match your filters.

                                Category
                                Status