crowbar/travis-ci-crowbar

View on GitHub

Showing 1,346 of 1,992 total issues

Function Enumerable has 209 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var Enumerable = (function() {
  function each(iterator, context) {
    var index = 0;
    try {
      this._each(function(value) {
Severity: Major
Found in crowbar_framework/app/assets/javascripts/prototype.js - About 1 day to fix

    Function Enumerable has 209 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var Enumerable = (function() {
      function each(iterator, context) {
        var index = 0;
        try {
          this._each(function(value) {

      Methods has 56 functions (exceeds 20 allowed). Consider refactoring.
      Open

      Element.Methods = {
        visible: function(element) {
          return $(element).style.display != 'none';
        },
      
      
      Severity: Major
      Found in crowbar_framework/app/assets/javascripts/prototype.js - About 1 day to fix

        Methods has 56 functions (exceeds 20 allowed). Consider refactoring.
        Open

        Element.Methods = {
          visible: function(element) {
            return $(element).style.display != 'none';
          },
        
        

          Class Nic has 55 methods (exceeds 20 allowed). Consider refactoring.
          Open

          class ::Nic
            include Comparable
            private
            @@interfaces = Hash.new
            @nic = nil
          Severity: Major
          Found in barclamps/deployer/chef/cookbooks/barclamp/libraries/nic.rb - About 7 hrs to fix

            File nic.rb has 490 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            class ::Nic
              include Comparable
              private
              @@interfaces = Hash.new
              @nic = nil
            Severity: Minor
            Found in barclamps/deployer/chef/cookbooks/barclamp/libraries/nic.rb - About 7 hrs to fix

              Method network_update has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
              Open

                def network_update(deployment_id, network_id, conduit_id, subnet, dhcp_enabled, ip_ranges, router_pref, router_ip)
                  Rails.logger.debug("Entering update_network #{id}")
              
                  network = nil
                  begin

              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

              Function _fnScrollDraw has 185 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function _fnScrollDraw ( o )
                      {
                          var
                              nScrollHeadInner = o.nScrollHead.getElementsByTagName('div')[0],
                              nScrollHeadTable = nScrollHeadInner.getElementsByTagName('table')[0],
              Severity: Major
              Found in crowbar_framework/app/assets/javascripts/jquery.dataTables.js - About 7 hrs to fix

                Function _fnScrollDraw has 185 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        function _fnScrollDraw ( o )
                        {
                            var
                                nScrollHeadInner = o.nScrollHead.getElementsByTagName('div')[0],
                                nScrollHeadTable = nScrollHeadInner.getElementsByTagName('table')[0],

                  Function support has 183 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  jQuery.support = (function() {
                  
                      var div = document.createElement( "div" ),
                          documentElement = document.documentElement,
                          all,
                  Severity: Major
                  Found in crowbar_framework/app/assets/javascripts/jquery.js - About 7 hrs to fix

                    Function support has 183 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    jQuery.support = (function() {
                    
                        var div = document.createElement( "div" ),
                            documentElement = document.documentElement,
                            all,
                    Severity: Major
                    Found in barclamps/crowbar/crowbar_framework/app/assets/javascripts/jquery.js - About 7 hrs to fix

                      Function classSettings has 177 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              function classSettings ()
                              {
                                  this.fnRecordsTotal = function ()
                                  {
                                      if ( this.oFeatures.bServerSide ) {
                      Severity: Major
                      Found in crowbar_framework/app/assets/javascripts/jquery.dataTables.js - About 7 hrs to fix

                        Function classSettings has 177 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                function classSettings ()
                                {
                                    this.fnRecordsTotal = function ()
                                    {
                                        if ( this.oFeatures.bServerSide ) {

                          File jquery.spritely-0.6.1.js has 455 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /*
                           * jQuery spritely 0.6.1
                           * http://spritely.net/
                           *
                           * Documentation:
                          Severity: Minor
                          Found in crowbar_framework/app/assets/javascripts/jquery.spritely-0.6.1.js - About 6 hrs to fix

                            File jquery.spritely-0.6.1.js has 455 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /*
                             * jQuery spritely 0.6.1
                             * http://spritely.net/
                             *
                             * Documentation:

                              Function _fnDraw has 169 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      function _fnDraw( oSettings )
                                      {
                                          var i, iLen;
                                          var anRows = [];
                                          var iRowCount = 0;
                              Severity: Major
                              Found in crowbar_framework/app/assets/javascripts/jquery.dataTables.js - About 6 hrs to fix

                                Function _fnDraw has 169 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        function _fnDraw( oSettings )
                                        {
                                            var i, iLen;
                                            var anRows = [];
                                            var iRowCount = 0;

                                  Function DragDropHelpers has 167 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  var DragDropHelpers = new function () {
                                      var me = this;
                                      
                                      var draggableNodes; 
                                      
                                  Severity: Major
                                  Found in crowbar_framework/app/assets/javascripts/drag_drop_helpers.js - About 6 hrs to fix

                                    Function DragDropHelpers has 167 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    var DragDropHelpers = new function () {
                                        var me = this;
                                        
                                        var draggableNodes; 
                                        

                                      Function _generateHTML has 164 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          _generateHTML: function(inst) {
                                              var today = new Date();
                                              today = this._daylightSavingAdjust(
                                                  new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
                                              var isRTL = this._get(inst, 'isRTL');
                                      Severity: Major
                                      Found in crowbar_framework/app/assets/javascripts/jquery-ui.js - About 6 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language