jbox-web/redmine_bootstrap_kit

View on GitHub

Showing 361 of 361 total issues

Avoid deeply nested control flow statements.
Open

            if (!m.atomic) continue;
Severity: Major
Found in assets/javascripts/codemirror/codemirror.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                if (sp.to != null && nextChange > sp.to) { nextChange = sp.to; spanEndStyle = ""; }
    Severity: Major
    Found in assets/javascripts/codemirror/codemirror.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                    if (pos < j) order.splice(at, 0, {from: pos, to: j, level: 1});
      Severity: Major
      Found in assets/javascripts/codemirror/codemirror.js - About 45 mins to fix

        Function yank has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

              yank: function(cm, operatorArgs, _vim, curStart, curEnd, curOriginal) {
        Severity: Minor
        Found in assets/javascripts/codemirror/keymap/vim.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                      if (!w.handleMouseEvents) wnode.ignoreEvents = true;
          Severity: Major
          Found in assets/javascripts/codemirror/codemirror.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                    if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\d+)$/)) {
                      if (indexOf(newGroup, Number(m[1])) > -1) {
                        lst(newChanges)[prop] = change[prop];
                        delete change[prop];
                      }
            Severity: Major
            Found in assets/javascripts/codemirror/codemirror.js - About 45 mins to fix

              Function runMode has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                function runMode(cm, text, mode, state, f, forceToEnd) {
              Severity: Minor
              Found in assets/javascripts/codemirror/codemirror.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                          if (search.lineObj == line && /div/i.test(search.nodeName)) { reuse = search; break; }
                Severity: Major
                Found in assets/javascripts/codemirror/codemirror.js - About 45 mins to fix

                  Function easeInBack has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      easeInBack: function (x, t, b, c, d, s) {
                  Severity: Minor
                  Found in assets/javascripts/jquery_file_tree/jquery_easing.js - About 45 mins to fix

                    Function easeInOutBack has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        easeInOutBack: function (x, t, b, c, d, s) {
                    Severity: Minor
                    Found in assets/javascripts/jquery_file_tree/jquery_easing.js - About 45 mins to fix

                      Method to_html has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def to_html
                            if @options.has_key?(:reverse) && @options[:reverse] == true
                              my_pagination =  pagination.reverse
                            else
                              my_pagination = pagination
                      Severity: Minor
                      Found in app/helpers/bootstrap/will_paginate_helper.rb - 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 (stream.eat(/[\<\>]/)) {
                              stream.eat(/[\<\>]/);
                              return "atom";
                            }
                      Severity: Major
                      Found in assets/javascripts/codemirror/mode/ruby/ruby.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                              if (stream.eat("'")) return chain(readQuoted("'", "atom", false), stream, state);
                        Severity: Major
                        Found in assets/javascripts/codemirror/mode/ruby/ruby.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                if (stream.eat('"')) return chain(readQuoted('"', "atom", true), stream, state);
                          Severity: Major
                          Found in assets/javascripts/codemirror/mode/ruby/ruby.js - About 45 mins to fix

                            Function easeOutBack has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                easeOutBack: function (x, t, b, c, d, s) {
                            Severity: Minor
                            Found in assets/javascripts/jquery_file_tree/jquery_easing.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                    if (stream.eat(/[a-zA-Z$@_]/)) {
                                      stream.eatWhile(/[\w]/);
                                      // Only one ? ! = is allowed and only as the last character
                                      stream.eat(/[\?\!\=]/);
                                      return "atom";
                              Severity: Major
                              Found in assets/javascripts/codemirror/mode/ruby/ruby.js - About 45 mins to fix

                                Similar blocks of code found in 2 locations. Consider refactoring.
                                Open

                                      setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth)));
                                Severity: Minor
                                Found in assets/javascripts/codemirror/codemirror.js and 1 other location - About 45 mins to fix
                                assets/javascripts/codemirror/codemirror.js on lines 2014..2014

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 50.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Similar blocks of code found in 2 locations. Consider refactoring.
                                Open

                                          this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
                                Severity: Minor
                                Found in assets/javascripts/bootstrap/bootstrap_tooltip.js and 1 other location - About 45 mins to fix
                                assets/javascripts/bootstrap/bootstrap_tooltip.js on lines 59..59

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 50.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Avoid deeply nested control flow statements.
                                Open

                                    } else if (ch == "@" && stream.match(/^@?[a-zA-Z_]/)) {
                                      stream.eat("@");
                                      stream.eatWhile(/[\w]/);
                                      return "variable-2";
                                    } else if (ch == "$") {
                                Severity: Major
                                Found in assets/javascripts/codemirror/mode/ruby/ruby.js - About 45 mins to fix

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                            this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
                                  Severity: Minor
                                  Found in assets/javascripts/bootstrap/bootstrap_tooltip.js and 1 other location - About 45 mins to fix
                                  assets/javascripts/bootstrap/bootstrap_tooltip.js on lines 60..60

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 50.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language