mattvanhorn/BJJLife

View on GitHub

Showing 39 of 102 total issues

Avoid deeply nested control flow statements.
Open

                                if(!settings.modal)
                                $.prettyPhoto.close();
Severity: Major
Found in app/assets/javascripts/jquery.prettyPhoto.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                if (c !== false) reInit = true;
                else eval('opts.'+a+' = b');
    Severity: Major
    Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                  if (typeof c !== 'boolean') c = true;
      Severity: Major
      Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 45 mins to fix

        Function gn_getItemsNextFilter has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          function gn_getItemsNextFilter(i, f, m, s, c) {
        Severity: Minor
        Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 35 mins to fix

          Function cf_e has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            function cf_e(n, c, pf, ns, rd) {
          Severity: Minor
          Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 35 mins to fix

            Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              def initialize(street, unit, city, us_state, postal_code)
            Severity: Minor
            Found in app/models/address.rb - About 35 mins to fix

              Function fx_fade has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                function fx_fade(sO, c, x, d, f) {
              Severity: Minor
              Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 35 mins to fix

                Function fx_cover has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  function fx_cover(sc, c1, c2, o, prev) {
                Severity: Minor
                Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 35 mins to fix

                  Function gn_getItemIndex has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    function gn_getItemIndex(num, dev, org, items, $cfs) {
                  Severity: Minor
                  Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 35 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                    return 'iframe';
                    Severity: Major
                    Found in app/assets/javascripts/jquery.prettyPhoto.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                      return 'inline';
                      Severity: Major
                      Found in app/assets/javascripts/jquery.prettyPhoto.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                        return 'custom';
                        Severity: Major
                        Found in app/assets/javascripts/jquery.prettyPhoto.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                          return 'image';
                          Severity: Major
                          Found in app/assets/javascripts/jquery.prettyPhoto.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                      return debug(conf, 'Callback "conditions" returned false.');
                            Severity: Major
                            Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                              return 'ajax';
                              Severity: Major
                              Found in app/assets/javascripts/jquery.prettyPhoto.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                        return true;
                                Severity: Major
                                Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                              return debug(conf, 'Carousel currently scrolling.');
                                  Severity: Major
                                  Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                        return -1;
                                    Severity: Major
                                    Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 30 mins to fix

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

                                        def standard_header(replacement_text=nil, &additional_content)
                                          header_text = (replacement_text.presence || t('.header'))
                                          extra = capture_haml(&additional_content) if block_given?
                                          capture_haml do
                                            haml_tag :div, :class => "row header" do
                                      Severity: Minor
                                      Found in app/helpers/application_helper.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