CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Avoid deeply nested control flow statements.
Open

        if (value[1]) return parseFloat(value[1]) / 100;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                  if (targetNode.parentNode == node) return [targetNode];
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 45 mins to fix

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

          setHash : function(name, values_obj, expires, path, domain, secure) {
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/js/utils.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                    if (node.nodeIndex == indices[j]) results.push(node);
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 45 mins to fix

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

          function convertRGBToHex(col) {
              var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
          
              if (!col)
                  return col;

          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 (TB_FoundURL) {
                                          TB_NextCaption = TB_TempArray[TB_Counter].title;
                                          TB_NextURL = TB_TempArray[TB_Counter].href;
                                          TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>"+thickboxL10n.next+"</a></span>";
                                      } else {
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/js/thickbox/thickbox.js - About 45 mins to fix

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

            function getType(v) {
                var fo, i, c, el, x, f = document.forms[0];
            
                fo = ed.getParam("media_types", "flash=swf;flv=flv;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';');
            
            

            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 ( dom.isEmpty( parent ) ) {
                                            dom.remove( parent );
                                        }

              Avoid deeply nested control flow statements.
              Open

                                  if ( lnk && lnk.childNodes.length == 1 )
                                      ed.dom.remove(lnk);
                                  else ed.dom.remove(el);

                Avoid deeply nested control flow statements.
                Open

                                            if ( ! editor.getParam( 'wpeditimage_html5_captions' ) ) {
                                                captionWidth += 10;
                                            }

                  Avoid deeply nested control flow statements.
                  Open

                                      if ( container.nextSibling ) {
                                          return;
                                      }
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/js/tinymce/plugins/wpview/plugin.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                if (value) {
                                                    attrs.map[name] = value;
                                                    attr.value = value;
                                                } else {
                                                    delete attrs.map[name];
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/js/tinymce/plugins/media/plugin.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          if ( b > B ) {
                                              if ( b - B < top - S )
                                                  window.scrollBy(0, (b - B) + 10);
                                              else
                                                  window.scrollBy(0, top - S - 40);
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/js/plupload/handlers.js - About 45 mins to fix

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

                                    windowManager.createInstance = function(className, a, b, c, d, e) {

                          Avoid deeply nested control flow statements.
                          Open

                                          if (editor.settings.video_template_callback) {
                                              html = editor.settings.video_template_callback(data);
                                          } else {
                                              html = (
                                                  '<video width="' + data.width + '" height="' + data.height + '"' + (data.poster ? ' poster="' + data.poster + '"' : '') + ' controls="controls">\n' +
                          Severity: Major
                          Found in Web.Admin/2014/wordpress/wp-includes/js/tinymce/plugins/media/plugin.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                  if(element.tagName == 'IMG' && element.width) {
                                    element.width++; element.width--;
                                  } else try {
                                    var n = document.createTextNode(' ');
                                    element.appendChild(n);
                            Severity: Major
                            Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                            if (targetNode.parentNode == node) return [targetNode];
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                if(_29>0){
                                _28=_29;
                                }
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                            } else if (combinator == 'adjacent') {
                                              for (var i = 0, node; node = nodes[i]; i++)
                                                if (Selector.handlers.previousElementSibling(targetNode) == node)
                                                  return [targetNode];
                                            } else nodes = h[combinator](nodes);
                                  Severity: Major
                                  Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 45 mins to fix

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

                                      getStyle: function(element, style) {
                                        element = $(element);
                                        style = style == 'float' ? 'cssFloat' : style.camelize();
                                        var value = element.style[style];
                                        if (!value) {
                                    Severity: Minor
                                    Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language