pboling/rack-insight

View on GitHub

Showing 94 of 116 total issues

Avoid too many return statements within this function.
Open

        return elem[ name ];
Severity: Major
Found in lib/rack/insight/public/__insight__/jquery-1.3.2.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                    return (elem.value || "").replace(/\r/g, "");
    Severity: Major
    Found in lib/rack/insight/public/__insight__/jquery-1.3.2.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return this.each(function(){
                  if ( this.nodeType != 1 )
                      return;
      
                  if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) )
      Severity: Major
      Found in lib/rack/insight/public/__insight__/jquery-1.3.2.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                                return true;
        Severity: Major
        Found in lib/rack/insight/public/__insight__/jquery-1.3.2.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return this.setArray(jQuery.isArray( selector ) ?
                      selector :
                      jQuery.makeArray(selector));
          Severity: Major
          Found in lib/rack/insight/public/__insight__/jquery-1.3.2.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return jQuery( document ).ready( selector );
            Severity: Major
            Found in lib/rack/insight/public/__insight__/jquery-1.3.2.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return undefined;
              Severity: Major
              Found in lib/rack/insight/public/__insight__/jquery-1.3.2.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return elem.filter && elem.filter.indexOf("opacity=") >= 0 ?
                                (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
                                "";
                Severity: Major
                Found in lib/rack/insight/public/__insight__/jquery-1.3.2.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return jQuery.attr( elem.style, "cssText", value );
                  Severity: Major
                  Found in lib/rack/insight/public/__insight__/jquery-1.3.2.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                            return diff == 0;
                    Severity: Major
                    Found in lib/rack/insight/public/__insight__/jquery-1.3.2.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return attr === null ? undefined : attr;
                      Severity: Major
                      Found in lib/rack/insight/public/__insight__/jquery-1.3.2.js - About 30 mins to fix

                        Method initialize has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def initialize(app)
                        
                              # Call super before setting up probes in case there are any custom probes configured
                              super # will setup custom probes
                        
                        
                        Severity: Minor
                        Found in lib/rack/insight/panels/log_panel.rb - About 25 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

                        Method symbolize_hash has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                              def symbolize_hash(hash)
                                symbolled_hash = {}
                                hash.each_key do |key|
                                  if String === key
                                    next if hash.has_key?(key.to_sym)
                        Severity: Minor
                        Found in lib/rack/insight/panels/speedtracer_panel/tracer.rb - About 25 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

                        Method delete_cache_list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                              def delete_cache_list
                                validate_params
                                raise "Rails not found... can't delete key" unless defined?(Rails)
                        
                                params.each do |key, value|
                        Severity: Minor
                        Found in lib/rack/insight/panels/cache_panel/panel_app.rb - About 25 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