jbox-web/redmine_bootstrap_kit

View on GitHub

Showing 361 of 361 total issues

Function updateDisplay has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function updateDisplay(cm, changes, viewPort, forced) {
    var oldFrom = cm.display.showingFrom, oldTo = cm.display.showingTo, updated;
    var visible = visibleLines(cm.display, cm.doc, viewPort);
    for (var first = true;; first = false) {
      var oldWidth = cm.display.scroller.clientWidth;
Severity: Minor
Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

    Function handleKeyBinding has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function handleKeyBinding(cm, e) {
        // Handle auto keymap transitions
        var startMap = getKeyMap(cm.options.keyMap), next = startMap.auto;
        clearTimeout(maybeTransition);
        if (next && !isModifierKey(e)) maybeTransition = setTimeout(function() {
    Severity: Minor
    Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

      Function moveByLines has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            moveByLines: function(cm, motionArgs, vim) {
              var cur = cm.getCursor();
              var endCh = cur.ch;
              // Depending what our last motion was, we may want to do different
              // things. If our last motion was moving vertically, we want to
      Severity: Minor
      Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

        Function cursorCoords has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function cursorCoords(cm, pos, context, lineObj, measurement) {
            lineObj = lineObj || getLine(cm.doc, pos.line);
            if (!measurement) measurement = measureLine(cm, lineObj);
            function get(ch, right) {
              var m = measureChar(cm, lineObj, ch, measurement, right ? "right" : "left");
        Severity: Minor
        Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

          Function enterInsertMode has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                enterInsertMode: function(cm, actionArgs, vim) {
                  if (cm.getOption('readOnly')) { return; }
                  vim.insertMode = true;
                  vim.insertModeRepeat = actionArgs && actionArgs.repeat || 1;
                  var insertAt = (actionArgs) ? actionArgs.insertAt : null;
          Severity: Minor
          Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

            Function readQuoted has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function readQuoted(quote, style, embed, unescaped) {
                return function(stream, state) {
                  var escaped = false, ch;
            
                  if (state.context.type === 'read-quoted-paused') {
            Severity: Minor
            Found in assets/javascripts/codemirror/mode/ruby/ruby.js - About 1 hr to fix

              Function removeTag has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      removeTag: function(tag, animate) {
                          animate = typeof animate === 'undefined' ? this.options.animate : animate;
              
                          tag = $(tag);
              
              
              Severity: Minor
              Found in assets/javascripts/bootstrap/jquery_tag_it.js - About 1 hr to fix

                Function incrementNumberToken has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      incrementNumberToken: function(cm, actionArgs) {
                        var cur = cm.getCursor();
                        var lineStr = cm.getLine(cur.line);
                        var re = /-?\d+/g;
                        var match;
                Severity: Minor
                Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

                  Function rebaseHistArray has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function rebaseHistArray(array, from, to, diff) {
                      for (var i = 0; i < array.length; ++i) {
                        var sub = array[i], ok = true;
                        for (var j = 0; j < sub.changes.length; ++j) {
                          var cur = sub.changes[j];
                  Severity: Minor
                  Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

                    Function moveByDisplayLines has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          moveByDisplayLines: function(cm, motionArgs, vim) {
                            var cur = cm.getCursor();
                            switch (vim.lastMotion) {
                              case this.moveByDisplayLines:
                              case this.moveByScroll:
                    Severity: Minor
                    Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                            if (ie && wrapping && ch == " " && i && !/\s/.test(text.charAt(i - 1)) &&
                                i < text.length - 1 && !/\s/.test(text.charAt(i + 1)))
                              span.style.whiteSpace = "normal";
                      Severity: Major
                      Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                            if (cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) && !posEq(sel.from, sel.to) &&
                                !posLess(start, sel.from) && !posLess(sel.to, start) && type == "single") {
                              var dragEnd = operation(cm, function(e2) {
                                if (webkit) display.scroller.draggable = false;
                                cm.state.draggingText = false;
                        Severity: Major
                        Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                                if (endsAfter || marker.type == "bookmark" && span.from == endCh && (!isInsert || span.marker.insertLeft)) {
                                  var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);
                                  (nw || (nw = [])).push({from: startsBefore ? null : span.from - endCh,
                                                          to: span.to == null ? null : span.to - endCh,
                                                          marker: marker});
                          Severity: Major
                          Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

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

                                  this.timeout = setTimeout(function() {
                                    if (self.hoverState == 'in') self.show()
                                  }, self.options.delay.show)
                            Severity: Major
                            Found in assets/javascripts/bootstrap/bootstrap_tooltip.js and 1 other location - About 1 hr to fix
                            assets/javascripts/bootstrap/bootstrap_tooltip.js on lines 109..111

                            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 55.

                            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.timeout = setTimeout(function() {
                                    if (self.hoverState == 'out') self.hide()
                                  }, self.options.delay.hide)
                            Severity: Major
                            Found in assets/javascripts/bootstrap/bootstrap_tooltip.js and 1 other location - About 1 hr to fix
                            assets/javascripts/bootstrap/bootstrap_tooltip.js on lines 97..99

                            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 55.

                            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

                                if (!!parserConf.version && parseInt(parserConf.version, 10) === 3) {
                                    commonkeywords = commonkeywords.concat(py3.keywords);
                                    commonBuiltins = commonBuiltins.concat(py3.builtins);
                                    var stringPrefixes = new RegExp("^(([rb]|(br))?('{3}|\"{3}|['\"]))", "i");
                                } else {
                            Severity: Minor
                            Found in assets/javascripts/codemirror/mode/python/python.js and 1 other location - About 55 mins to fix
                            assets/javascripts/codemirror/mode/python/python.js on lines 49..53

                            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 53.

                            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

                                } else {
                                    commonkeywords = commonkeywords.concat(py2.keywords);
                                    commonBuiltins = commonBuiltins.concat(py2.builtins);
                                    var stringPrefixes = new RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))", "i");
                                }
                            Severity: Minor
                            Found in assets/javascripts/codemirror/mode/python/python.js and 1 other location - About 55 mins to fix
                            assets/javascripts/codemirror/mode/python/python.js on lines 45..49

                            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 53.

                            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

                            Function doReplace has 7 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                function doReplace(cm, confirm, lineStart, lineEnd, searchCursor, query,
                                    replaceWith) {
                            Severity: Major
                            Found in assets/javascripts/codemirror/keymap/vim.js - About 50 mins to fix

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

                                next: function() {
                                  if (this.pos < this.string.length)
                                    return this.string.charAt(this.pos++);
                                },
                              assets/javascripts/codemirror/codemirror.js on lines 3720..3723

                              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 51.

                              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

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

                                  next: function() {
                                    if (this.pos < this.string.length)
                                      return this.string.charAt(this.pos++);
                                  },
                              Severity: Minor
                              Found in assets/javascripts/codemirror/codemirror.js and 1 other location - About 50 mins to fix
                              assets/javascripts/codemirror/addon/runmode/runmode-standalone.js on lines 18..21

                              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 51.

                              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