jbox-web/redmine_bootstrap_kit

View on GitHub

Showing 278 of 361 total issues

Function buildLineElement has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function buildLineElement(cm, line, lineNo, dims, reuse) {
    var built = buildLineContent(cm, line), lineElement = built.pre;
    var markers = line.gutterMarkers, display = cm.display, wrap;

    var bgClass = built.bgClass ? built.bgClass + " " + (line.bgClass || "") : line.bgClass;
Severity: Major
Found in assets/javascripts/codemirror/codemirror.js - About 2 hrs to fix

    Function sort has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          sort: function(cm, params) {
            var reverse, ignoreCase, unique, number;
            function parseArgs() {
              if (params.argString) {
                var args = new CodeMirror.StringStream(params.argString);
    Severity: Major
    Found in assets/javascripts/codemirror/keymap/vim.js - About 2 hrs to fix

      Function measureLineInner has 67 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function measureLineInner(cm, line) {
          if (!cm.options.lineWrapping && line.text.length >= cm.options.crudeMeasuringFrom)
            return crudelyMeasureLine(cm, line);
      
          var display = cm.display, measure = emptyArray(line.text.length);
      Severity: Major
      Found in assets/javascripts/codemirror/codemirror.js - About 2 hrs to fix

        Function updateSelectionRange has 63 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function updateSelectionRange(cm) {
            var display = cm.display, doc = cm.doc, sel = cm.doc.sel;
            var fragment = document.createDocumentFragment();
            var clientWidth = display.lineSpace.offsetWidth, pl = paddingLeft(cm.display);
        
        
        Severity: Major
        Found in assets/javascripts/codemirror/codemirror.js - About 2 hrs to fix

          Function createCircularJumpList has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var createCircularJumpList = function() {
                var size = 100;
                var pointer = -1;
                var head = 0;
                var tail = 0;
          Severity: Major
          Found in assets/javascripts/codemirror/keymap/vim.js - About 2 hrs to fix

            Consider simplifying this complex logical expression.
            Open

                                if (
                                    (event.which === $.ui.keyCode.COMMA && event.shiftKey === false) ||
                                    event.which === $.ui.keyCode.ENTER ||
                                    (
                                        event.which == $.ui.keyCode.TAB &&
            Severity: Critical
            Found in assets/javascripts/bootstrap/jquery_tag_it.js - About 2 hrs to fix

              Function matchCommand has 56 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    matchCommand: function(key, keyMap, vim) {
                      var inputState = vim.inputState;
                      var keys = inputState.keyBuffer.concat(key);
                      var matchedCommands = [];
                      var selectedCharacter;
              Severity: Major
              Found in assets/javascripts/codemirror/keymap/vim.js - About 2 hrs to fix

                Function patchDisplay has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function patchDisplay(cm, from, to, intact, updateNumbersFrom) {
                    var dims = getDimensions(cm);
                    var display = cm.display, lineNumbers = cm.options.lineNumbers;
                    if (!intact.length && (!webkit || !cm.display.currentWheelTarget))
                      removeChildren(display.lineDiv);
                Severity: Major
                Found in assets/javascripts/codemirror/codemirror.js - About 2 hrs to fix

                  File bootstrap_tooltip.js has 258 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /* ===========================================================
                   * bootstrap-tooltip.js v2.3.2
                   * http://getbootstrap.com/2.3.2/javascript.html#tooltips
                   * Inspired by the original jQuery.tipsy by Jason Frame
                   * ===========================================================
                  Severity: Minor
                  Found in assets/javascripts/bootstrap/bootstrap_tooltip.js - About 2 hrs to fix

                    Function insertLineContent has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function insertLineContent(line, builder, styles) {
                        var spans = line.markedSpans, allText = line.text, at = 0;
                        if (!spans) {
                          for (var i = 1; i < styles.length; i+=2)
                            builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder));
                    Severity: Major
                    Found in assets/javascripts/codemirror/codemirror.js - About 2 hrs to fix

                      Function markText has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function markText(doc, from, to, options, type) {
                          if (options && options.shared) return markTextShared(doc, from, to, options, type);
                          if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type);
                      
                          var marker = new TextMarker(doc, type);
                      Severity: Major
                      Found in assets/javascripts/codemirror/codemirror.js - About 2 hrs to fix

                        Function token has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            token: function(stream, state) {
                              var ch = stream.peek();
                              var esc = state.escaped;
                              state.escaped = false;
                              /* comments */
                        Severity: Major
                        Found in assets/javascripts/codemirror/mode/yaml/yaml.js - About 2 hrs to fix

                          Function findWord has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function findWord(cm, cur, forward, bigWord, emptyLineIsWord) {
                                var lineNum = cur.line;
                                var pos = cur.ch;
                                var line = cm.getLine(lineNum);
                                var dir = forward ? 1 : -1;
                          Severity: Major
                          Found in assets/javascripts/codemirror/keymap/vim.js - About 2 hrs to fix

                            Function endOperation has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function endOperation(cm) {
                                var op = cm.curOp, doc = cm.doc, display = cm.display;
                                cm.curOp = null;
                            
                                if (op.updateMaxLine) computeMaxLength(cm);
                            Severity: Major
                            Found in assets/javascripts/codemirror/codemirror.js - About 2 hrs to fix

                              Function stretchSpansOverChange has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function stretchSpansOverChange(doc, change) {
                                  var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;
                                  var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;
                                  if (!oldFirst && !oldLast) return null;
                              
                              
                              Severity: Major
                              Found in assets/javascripts/codemirror/codemirror.js - About 2 hrs to fix

                                Function onContextMenu has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function onContextMenu(cm, e) {
                                    if (signalDOMEvent(cm, e, "contextmenu")) return;
                                    var display = cm.display, sel = cm.doc.sel;
                                    if (eventInWidget(display, e) || contextMenuInGutter(cm, e)) return;
                                
                                
                                Severity: Major
                                Found in assets/javascripts/codemirror/codemirror.js - About 2 hrs to fix

                                  Function onScrollWheel has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    function onScrollWheel(cm, e) {
                                      var dx = e.wheelDeltaX, dy = e.wheelDeltaY;
                                      if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail;
                                      if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail;
                                      else if (dy == null) dy = e.wheelDelta;
                                  Severity: Minor
                                  Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

                                    Function buildVimKeyMap has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function buildVimKeyMap() {
                                          /**
                                           * Handle the raw key event from CodeMirror. Translate the
                                           * Shift + key modifier to the resulting letter, while preserving other
                                           * modifers.
                                    Severity: Minor
                                    Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

                                      Function makeDisplay has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        function makeDisplay(place, docStart) {
                                          var d = {};
                                      
                                          var input = d.input = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none; font-size: 4px;");
                                          if (webkit) input.style.width = "1000px";
                                      Severity: Minor
                                      Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

                                        Function substitute has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                              substitute: function(cm, params) {
                                                if (!cm.getSearchCursor) {
                                                  throw new Error('Search feature not available. Requires searchcursor.js or ' +
                                                      'any other getSearchCursor implementation.');
                                                }
                                        Severity: Minor
                                        Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language