CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Avoid deeply nested control flow statements.
Open

                        if ( li != hovering )
                            li.className = li.className ? li.className.replace( rselected, '' ) : '';
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/admin-bar.js - About 45 mins to fix

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

    function PopupWindow_hidePopup() {
        if (this.divName != null) {
            if (this.use_gebi) {
                document.getElementById(this.divName).style.visibility = "hidden";
                }
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.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 ( dom.isEmpty( parent ) ) {
                                    dom.remove( parent );
                                }

      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

        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;
                                      }

            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 (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

                  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 (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

                      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(_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

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

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

                            getTokenBounds: function() {
                              if (null != this.tokenBounds) return this.tokenBounds;
                              var value = this.element.value;
                              if (value.strip().empty()) return [-1, 0];
                              var diff = arguments.callee.getFirstDifferencePos(value, this.oldElementValue);
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/controls.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 (node.nodeIndex == indices[j]) results.push(node);
                          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 (element.offsetParent == document.body)
                                    if (Element.getStyle(element, 'position') == 'absolute') break;
                            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(el.childNodes.length){
                              el.removeChild(el.childNodes[0]);
                              }
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.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