concord-consortium/rigse

View on GitHub

Showing 2,136 of 2,138 total issues

Avoid deeply nested control flow statements.
Open

                        if( !renderer.isPositioned ) {
                            renderer.updatePos();
                        }
Severity: Major
Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        if (img.imgType === 'linear-gradient' ) {
                            bgAreaSize = me.getBgAreaSize( img.bgOrigin );
                            bgSize = ( img.bgSize || PIE.BgSize.DEFAULT ).pixels(
                                me.targetElement, bgAreaSize.w, bgAreaSize.h, bgAreaSize.w, bgAreaSize.h
                            ),
    Severity: Major
    Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          else if( tokens[1].isLengthOrPercent() ) {
                              vals[3] = PIE.getLength( tokens[1].tokenValue );
                          }
      Severity: Major
      Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if( styles[ side ] === 'dashed' || styles[ side ] === 'dotted' ) {
                                    segments.push( {
                                        path: curve( cornerBefore, beforeX, beforeY, baseAngle + 45, 0, 1 ) +
                                              curve( cornerBefore, 0, 0, baseAngle, 1, 0 ),
                                        fill: colors[ side ]
        Severity: Major
        Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  for( i = 0; i < len; i++ ) {
                                      renderers[i].updatePos();
                                  }
          Severity: Major
          Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                for( j = 4; j--; ) {
                                    corner = corners[j];
                                    isBottom = corner.charAt( 0 ) === 'b';
                                    isRight = corner.charAt( 1 ) === 'r';
                                    shape = getShadowShape( i, corner, xOff, yOff, color, blur, path );
            Severity: Major
            Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if( token.tokenType & PIE.Tokenizer.Type.OPERATOR && token.tokenValue === '/' ) {
                                      y = collectLengths();
                                  }
              Severity: Major
              Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if( tokens[0].tokenValue === 'center' ) {
                                            vals[1] = length_fifty;
                                        } else {
                                            vals[0] = tokens[0].tokenValue;
                                        }
                Severity: Major
                Found in rails/app/assets/javascripts/pie/PIE_uncompressed.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 rails/app/assets/javascripts/prototype.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if( tokens[1].tokenValue === 'center' ) {
                                                vals[3] = length_fifty;
                                            } else {
                                                vals[2] = tokens[1].tokenValue;
                                            }
                    Severity: Major
                    Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          while( (token = tokenizer.next()) ) {
                                              tokType = token.tokenType;
                                              tokVal = token.tokenValue;
                      
                                              // If we reached the end of the function and had at least 2 stops, flush the info
                      Severity: Major
                      Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 45 mins to fix

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

                          focus: function(event, element) {
                            if (event)
                              event.stop();
                        
                            // Multi selection with shift
                        Severity: Minor
                        Found in rails/public/javascripts/light_box.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

                        Avoid deeply nested control flow statements.
                        Open

                                            else if( tokens[0].isLengthOrPercent() ) {
                                                vals[1] = PIE.getLength( tokens[0].tokenValue );
                                            }
                        Severity: Major
                        Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                      if (! selected.empty())
                                        this.selectedList = this.selectedList.findAll(function(entry) {return !selected.include(entry.value)});
                          Severity: Major
                          Found in rails/public/javascripts/light_box.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if( (token = tokenizer.next()) ) {
                                                    if( ( token.tokenType & IDENT ) && this.repeatIdents[token.tokenValue] ) {
                                                        p.repeat.v = token.tokenValue;
                                                    } else {
                                                        tokenizer.prev();
                            Severity: Major
                            Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 45 mins to fix

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

                                updateContent: function(responseText) {
                                  var receiver = this.container[this.success() ? 'success' : 'failure'],
                                    options = this.options;
                              
                                  if (!options.evalScripts) responseText = responseText.stripScripts();
                              Severity: Minor
                              Found in rails/app/assets/javascripts/prototype.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

                              Avoid deeply nested control flow statements.
                              Open

                                                      if( el.tagName === 'IMG' ) {
                                                          childRenderers.push( new PIE.ImgRenderer( el, boundsInfo, styleInfos, rootRenderer ) );
                                                      }
                              Severity: Major
                              Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                          if (Element.getStyle(element, 'position') == 'absolute') break;
                                Severity: Major
                                Found in rails/app/assets/javascripts/prototype.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                    if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
                                                      if ( useCache ) {
                                                        (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
                                                      }
                                  
                                  
                                  Severity: Major
                                  Found in rails/app/assets/javascripts/prototype.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 rails/app/assets/javascripts/jquery/jquery.js - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language