XoopsModules25x/xoopsinfo

View on GitHub

Showing 1,065 of 16,781 total issues

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 phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        while ( j-- ) {
                            if ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), "tbody" ) &&
                                !tbody.childNodes.length ) {
    
                                elem.removeChild( tbody );
    Severity: Major
    Found in phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if ( hasScripts ) {
      
                              // Support: Android<4.1, PhantomJS<2
                              // push.apply(_, arraylike) throws on ancient WebKit
                              jQuery.merge( scripts, getAll( node, "script" ) );
      Severity: Major
      Found in phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                    for ( j=0, jLen=(nTds.length/iColumns) ; j<jLen ; j++ )
                                    {
                                        nTds[(iColumns*j)+i].className = 
                                            $.trim( nTds[(iColumns*j)+i].className.replace( sClass+"1", "" ) );
                                    }
        Severity: Major
        Found in phpsysinfo/js/jQuery/jquery.dataTables.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if (disks[i]["@attributes"][proc_param] !== undefined) {
                                      $('#stablebit-'+ i+ "-" + proc_param).render(disks[i]["@attributes"], directives);
                                  }
          Severity: Major
          Found in phpsysinfo/plugins/stablebit/js/stablebit_bootstrap.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if (!isNaN(parseInt(raiditems[i]["@attributes"].Stride))) html += "<tr class=\"treegrid-parent-raid-" + i + "\"><td><span class=\"treegrid-spanbold\">"+genlang(7, 'raid')+"</span></td><td>" + parseInt(raiditems[i]["@attributes"].Stride) + "</td></tr>"; // Stride
            Severity: Major
            Found in phpsysinfo/plugins/raid/js/raid_bootstrap.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if (raiditems[i]["@attributes"].Controller !== undefined) html += "<tr class=\"treegrid-parent-raid-" + i + "\"><td><span class=\"treegrid-spanbold\">"+genlang(19, 'raid')+"</span></td><td>" + raiditems[i]["@attributes"].Controller + "</td></tr>"; // Controller
              Severity: Major
              Found in phpsysinfo/plugins/raid/js/raid_bootstrap.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if (raiditems[i]["@attributes"].ReadPolicy !== undefined) html += "<tr class=\"treegrid-parent-raid-" + i + "\"><td><span class=\"treegrid-spanbold\">"+genlang(23, 'raid')+"</span></td><td>" + raiditems[i]["@attributes"].ReadPolicy + "</td></tr>"; // Read Policy
                Severity: Major
                Found in phpsysinfo/plugins/raid/js/raid_bootstrap.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if (raiditems[i]["@attributes"].Cache_Size !== undefined) html += "<tr class=\"treegrid-parent-raid-" + i + "\"><td><span class=\"treegrid-spanbold\">"+genlang(25, 'raid')+"</span></td><td>" + formatBytes(parseInt(raiditems[i]["@attributes"].Cache_Size), data.Options["@attributes"].byteFormat) + "</td></tr>"; // Cache_Size
                  Severity: Major
                  Found in phpsysinfo/plugins/raid/js/raid_bootstrap.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 phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

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

                        Avoid deeply nested control flow statements.
                        Open

                                                    if (href.substring(0, 2) === "//") {
                                                        href = w.location.protocol + href;
                                                    }
                        Severity: Major
                        Found in phpsysinfo/js/vendor/bootstrap-ie8.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if (bats[i]["@attributes"][proc_param] !== undefined) {
                                                      html+="<tr id=\"bat-" + i + "-" + proc_param + "\" class=\"treegrid-parent-bat-" + i + "\">";
                                                      html+="<td><span class=\"treegrid-spanbold\">" + genlang(paramlist[proc_param], 'bat') + "</span></td>";
                                                      html+="<td><span data-bind=\"" + proc_param + "\"></span></td>";
                                                      if (paramlis2[proc_param] !== undefined) {
                          Severity: Major
                          Found in phpsysinfo/plugins/bat/js/bat_bootstrap.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if (smartid === "194") {
                                                    html += '<td class="rightCell">' + formatTemp(itemvalue, data.Options["@attributes"].tempFormat) + '</td>';
                                                } else {
                                                    html += '<td class="rightCell">' + itemvalue + '</td>';
                                                }
                            Severity: Major
                            Found in phpsysinfo/plugins/smart/js/smart_bootstrap.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  if (raiditems[i]["@attributes"].Devs !== undefined) html += "<tr class=\"treegrid-parent-raid-" + i + "\"><td><span class=\"treegrid-spanbold\">"+genlang(9, 'raid')+"</span></td><td>" + parseInt(raiditems[i]["@attributes"].Devs) + "</td></tr>"; // Devices
                              Severity: Major
                              Found in phpsysinfo/plugins/raid/js/raid_bootstrap.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                    for (var j = 0; j < diskitems.length ; j++) {
                                                        raid_diskicon(diskitems[j]["@attributes"], k, j);
                                                    }
                                Severity: Major
                                Found in phpsysinfo/plugins/raid/js/raid_bootstrap.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                      if (!isNaN(parseInt(raiditems[i]["@attributes"].Disks_Registered)) && !isNaN(parseInt(raiditems[i]["@attributes"].Disks_Active))) {
                                                          html += "<tr class=\"treegrid-parent-raid-" + i + "\"><td><span class=\"treegrid-spanbold\">"+genlang(18, 'raid')+"</span></td><td>" + parseInt(raiditems[i]["@attributes"].Disks_Registered) + "/<wbr>" + parseInt(raiditems[i]["@attributes"].Disks_Active) + "</td></tr>";
                                                      }
                                  Severity: Major
                                  Found in phpsysinfo/plugins/raid/js/raid_bootstrap.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                        if (raiditems[i]["@attributes"].Supported !== undefined) html += "<tr class=\"treegrid-parent-raid-" + i + "\"><td><span class=\"treegrid-spanbold\">"+genlang(21, 'raid')+"</span></td><td>" + raiditems[i]["@attributes"].Supported + "</td></tr>"; // Supported RAID-Types
                                    Severity: Major
                                    Found in phpsysinfo/plugins/raid/js/raid_bootstrap.js - About 45 mins to fix

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

                                      },{"./helpers":5,"./instance":6}],4:[function(require,module,exports){
                                      var AttributeFactory, Checkbox, Element, ElementFactory, Input, Radio, Select, TextArea, VoidElement, helpers, _,
                                        __hasProp = {}.hasOwnProperty,
                                        __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
                                      
                                      
                                      Severity: Minor
                                      Found in phpsysinfo/js/vendor/transparency.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 (raiditems[i]["@attributes"].Algorithm !== undefined) html += "<tr class=\"treegrid-parent-raid-" + i + "\"><td><span class=\"treegrid-spanbold\">"+genlang(14, 'raid')+"</span></td><td>" + raiditems[i]["@attributes"].Algorithm + "</td></tr>";
                                      Severity: Major
                                      Found in phpsysinfo/plugins/raid/js/raid_bootstrap.js - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language