jbox-web/redmine_bootstrap_kit

View on GitHub

Showing 278 of 361 total issues

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

              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

                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 (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 (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

                      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

                        Avoid deeply nested control flow statements.
                        Open

                                    if (widget.node == n.firstChild) {
                                      if (!widget.above && !insertBefore) insertBefore = n;
                                      positionLineWidget(widget, n, reuse, dims);
                                      ++widgetsSeen;
                                      break;
                        Severity: Major
                        Found in assets/javascripts/codemirror/codemirror.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                    } else if (sp.from > pos && nextChange > sp.from) {
                                      nextChange = sp.from;
                                    }
                          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 (m.className) spanStyle += " " + m.className;
                              Severity: Major
                              Found in assets/javascripts/codemirror/codemirror.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                            if (m.collapsed && (!collapsed || collapsed.marker.size < m.size))
                                              collapsed = sp;
                                Severity: Major
                                Found in assets/javascripts/codemirror/codemirror.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                  if (selectionEnd.line > lastLine) {
                                                    selectionEnd.line = lastLine;
                                                  }
                                  Severity: Major
                                  Found in assets/javascripts/codemirror/keymap/vim.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 (!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 (oldCur[k].marker == span.marker) continue spans;
                                        Severity: Major
                                        Found in assets/javascripts/codemirror/codemirror.js - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language