jbox-web/redmine_bootstrap_kit

View on GitHub

Showing 278 of 361 total issues

Function buildKeymap has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function buildKeymap(pairs) {
    var map = {
      name : "autoCloseBrackets",
      Backspace: function(cm) {
        if (cm.somethingSelected()) return CodeMirror.Pass;
Severity: Minor
Found in assets/javascripts/codemirror/addon/edit/closebrackets.js - About 1 hr to fix

    Function onDrop has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function onDrop(e) {
        var cm = this;
        if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e) || (cm.options.onDragEvent && cm.options.onDragEvent(cm, addStop(e))))
          return;
        e_preventDefault(e);
    Severity: Minor
    Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

      Function buildLineContent has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function buildLineContent(cm, realLine, measure, copyWidgets) {
          var merged, line = realLine, empty = true;
          while (merged = collapsedSpanAtStart(line))
            line = getLine(cm.doc, merged.find().from.line);
      
      
      Severity: Minor
      Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

        Function findBeginningAndEnd has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function findBeginningAndEnd(cm, symb, inclusive) {
              var cur = cm.getCursor();
              var line = cm.getLine(cur.line);
              var chars = line.split('');
              var start, end, i, len;
        Severity: Minor
        Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

          Function updateScrollbars has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function updateScrollbars(cm) {
              var d = cm.display, docHeight = cm.doc.height;
              var totalHeight = docHeight + paddingVert(d);
              d.sizer.style.minHeight = d.heightForcer.style.top = totalHeight + "px";
              d.gutters.style.height = Math.max(totalHeight, d.scroller.clientHeight - scrollerCutOff) + "px";
          Severity: Minor
          Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

            Function updateDoc has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function updateDoc(doc, change, markedSpans, selAfter, estimateHeight) {
                function spansFor(n) {return markedSpans ? markedSpans[n] : null;}
                function update(line, text, spans) {
                  updateLine(line, text, spans, estimateHeight);
                  signalLater(line, "change", line, change);
            Severity: Minor
            Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

              Function moveToWord has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function moveToWord(cm, repeat, forward, wordEnd, bigWord) {
                    var cur = cm.getCursor();
                    var curStart = copyCursor(cur);
                    var words = [];
                    if (forward && !wordEnd || !forward && wordEnd) {
              Severity: Minor
              Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

                Function buildToken has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function buildToken(builder, text, style, startStyle, endStyle, title) {
                    if (!text) return;
                    var special = builder.cm.options.specialChars;
                    if (!special.test(text)) {
                      builder.col += text.length;
                Severity: Minor
                Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

                  Function paste has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        paste: function(cm, actionArgs) {
                          var cur = cm.getCursor();
                          var register = vimGlobalState.registerController.getRegister(
                              actionArgs.registerName);
                          if (!register.text) {
                  Severity: Minor
                  Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

                    Function destroy has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            destroy: function() {
                                $.Widget.prototype.destroy.call(this);
                    
                                this.element.unbind('.tagit');
                                this.tagList.unbind('.tagit');
                    Severity: Minor
                    Found in assets/javascripts/bootstrap/jquery_tag_it.js - About 1 hr to fix

                      Function setTagIt has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function setTagIt(){
                        $('[data-toggle="tagit"]').each(function(){
                      
                          var data_source = $(this).data('source');
                          var callback_after_add = $(this).data('after-add');
                      Severity: Minor
                      Found in assets/javascripts/bootstrap/jquery_tag_it_helper.js - About 1 hr to fix

                        Function indentLine has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          function indentLine(cm, n, how, aggressive) {
                            var doc = cm.doc;
                            if (how == null) how = "add";
                            if (how == "smart") {
                              if (!cm.doc.mode.indent) how = "prev";
                        Severity: Minor
                        Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

                          Function coordsCharInner has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function coordsCharInner(cm, lineObj, lineNo, x, y) {
                              var innerOff = y - heightAtLine(cm, lineObj);
                              var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth;
                              var measurement = measureLine(cm, lineObj);
                          
                          
                          Severity: Minor
                          Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

                            Function clear has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              TextMarker.prototype.clear = function() {
                                if (this.explicitlyCleared) return;
                                var cm = this.doc.cm, withOp = cm && !cm.curOp;
                                if (withOp) startOperation(cm);
                                if (hasHandler(this, "clear")) {
                            Severity: Minor
                            Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

                              Function pushText has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                    pushText: function(registerName, operator, text, linewise) {
                                      if (linewise && text.charAt(0) == '\n') {
                                        text = text.slice(1) + '\n';
                                      }
                                      if(linewise && text.charAt(text.length - 1) !== '\n'){
                              Severity: Minor
                              Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

                                Function CodeMirror has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function CodeMirror(place, options) {
                                    if (!(this instanceof CodeMirror)) return new CodeMirror(place, options);
                                
                                    this.options = options = options || {};
                                    // Determine effective options based on given values and defaults.
                                Severity: Minor
                                Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

                                  Function repeatLastEdit has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function repeatLastEdit(cm, vim, repeat, repeatForInsert) {
                                        var macroModeState = vimGlobalState.macroModeState;
                                        macroModeState.inReplay = true;
                                        var isAction = !!vim.lastEditActionCommand;
                                        var cachedInputState = vim.inputState;
                                  Severity: Minor
                                  Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                        if (cur &&
                                            (hist.lastOp == opId ||
                                             hist.lastOrigin == change.origin && change.origin &&
                                             ((change.origin.charAt(0) == "+" && doc.cm && hist.lastTime > time - doc.cm.options.historyEventDelay) ||
                                              change.origin.charAt(0) == "*"))) {
                                    Severity: Critical
                                    Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

                                      Function readInput has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        function readInput(cm) {
                                          var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc, sel = doc.sel;
                                          if (!cm.state.focused || hasSelection(input) || isReadOnly(cm) || cm.state.disableInput) return false;
                                          if (cm.state.pasteIncoming && cm.state.fakedLastChar) {
                                            input.value = input.value.substring(0, input.value.length - 1);
                                      Severity: Minor
                                      Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

                                        Function highlightWorker has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          function highlightWorker(cm) {
                                            var doc = cm.doc;
                                            if (doc.frontier < doc.first) doc.frontier = doc.first;
                                            if (doc.frontier >= cm.display.showingTo) return;
                                            var end = +new Date + cm.options.workTime;
                                        Severity: Minor
                                        Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language