jbox-web/redmine_bootstrap_kit

View on GitHub

Showing 278 of 361 total issues

Function tokenBase has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function tokenBase(stream, state) {


    stream.eatWhile(/[\w\$_]/);

Severity: Minor
Found in assets/javascripts/codemirror/mode/nginx/nginx.js - About 1 hr to fix

    Function runMode has 48 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    CodeMirror.runMode = function(string, modespec, callback, options) {
      var mode = CodeMirror.getMode(CodeMirror.defaults, modespec);
      var ie = /MSIE \d/.test(navigator.userAgent);
      var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9);
    
    
    Severity: Minor
    Found in assets/javascripts/codemirror/addon/runmode/runmode.js - About 1 hr to fix

      Function toggleVisualMode has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            toggleVisualMode: function(cm, actionArgs, vim) {
              var repeat = actionArgs.repeat;
              var curStart = cm.getCursor();
              var curEnd;
              // TODO: The repeat should actually select number of characters/lines
      Severity: Minor
      Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

        Function expandWordUnderCursor has 46 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function expandWordUnderCursor(cm, inclusive, _forward, bigWord, noSymbol) {
              var cur = cm.getCursor();
              var line = cm.getLine(cur.line);
              var idx = cur.ch;
        
        
        Severity: Minor
        Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

          Function findSymbol has 46 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function findSymbol(cm, repeat, forward, symb) {
                var cur = cm.getCursor();
                var increment = forward ? 1 : -1;
                var endLine = forward ? cm.lineCount() : -1;
                var curCh = cur.ch;
          Severity: Minor
          Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

            Function runMode has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            CodeMirror.runMode = function (string, modespec, callback, options) {
              var mode = CodeMirror.getMode({ indentUnit: 2 }, modespec);
            
              if (callback.nodeType == 1) {
                var tabSize = (options && options.tabSize) || 4;
            Severity: Minor
            Found in assets/javascripts/codemirror/addon/runmode/runmode-standalone.js - About 1 hr to fix

              Function fileTree has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      fileTree: function(o, h) {
                          // Defaults
                          if( !o ) var o = {};
                          if( o.root == undefined ) o.root = '/';
                          if( o.script == undefined ) o.script = 'jqueryFileTree.php';
              Severity: Minor
              Found in assets/javascripts/jquery_file_tree/jquery_file_tree.js - About 1 hr to fix

                Function tokenLexer has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function tokenLexer(stream, state) {
                        indentInfo = null;
                        var style = state.tokenize(stream, state);
                        var current = stream.current();
                
                
                Severity: Minor
                Found in assets/javascripts/codemirror/mode/python/python.js - About 1 hr to fix

                  Function skipAtomic has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function skipAtomic(doc, pos, bias, mayClear) {
                      var flipped = false, curPos = pos;
                      var dir = bias || 1;
                      doc.cantEdit = false;
                      search: for (;;) {
                  Severity: Minor
                  Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

                    Function fromTextArea has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      CodeMirror.fromTextArea = function(textarea, options) {
                        if (!options) options = {};
                        options.value = textarea.value;
                        if (!options.tabindex && textarea.tabindex)
                          options.tabindex = textarea.tabindex;
                    Severity: Minor
                    Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

                      Function processCommand has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            processCommand: function(cm, input) {
                              var vim = cm.state.vim;
                              if (vim.visualMode) {
                                exitVisualMode(cm);
                              }
                      Severity: Minor
                      Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

                        Function handleKey has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              handleKey: function(cm, key) {
                                var command;
                                var vim = maybeInitVimState(cm);
                                var macroModeState = vimGlobalState.macroModeState;
                                if (macroModeState.enteredMacroMode) {
                        Severity: Minor
                        Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

                          Function findMatchedSymbol has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function findMatchedSymbol(cm, cur, symb) {
                                var line = cur.line;
                                var ch = cur.ch;
                                symb = symb ? symb : cm.getLine(line).charAt(ch);
                          
                          
                          Severity: Minor
                          Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

                            Function show has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              , show: function () {
                                  var $tip
                                    , pos
                                    , actualWidth
                                    , actualHeight
                            Severity: Minor
                            Found in assets/javascripts/bootstrap/bootstrap_tooltip.js - About 1 hr to fix

                              Consider simplifying this complex logical expression.
                              Open

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

                                Consider simplifying this complex logical expression.
                                Open

                                            if (opts) {
                                              opts = opts[0];
                                              ignoreCase = opts.indexOf('i') != -1;
                                              unique = opts.indexOf('u') != -1;
                                              var decimal = opts.indexOf('d') != -1 && 1;
                                Severity: Critical
                                Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                      if (tok.type == "string" && (tok.end != pos.ch || !/[\"\']/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1) ||
                                          tok.type == "tag" && state.type == "closeTag" ||
                                          tok.string.indexOf("/") == (tok.string.length - 1) || // match something like <someTagName />
                                          dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1)
                                        return CodeMirror.Pass;
                                  Severity: Critical
                                  Found in assets/javascripts/codemirror/addon/edit/closetag.js - About 1 hr to fix

                                    Function findPosH has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      function findPosH(doc, pos, dir, unit, visually) {
                                        var line = pos.line, ch = pos.ch, origDir = dir;
                                        var lineObj = getLine(doc, line);
                                        var possible = true;
                                        function findNextLine() {
                                    Severity: Minor
                                    Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix

                                      Function delmarks has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                            delmarks: function(cm, params) {
                                              if (!params.argString || !params.argString.trim()) {
                                                showConfirm(cm, 'Argument required');
                                                return;
                                              }
                                      Severity: Minor
                                      Found in assets/javascripts/codemirror/keymap/vim.js - About 1 hr to fix

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

                                          function makeChangeSingleDocInEditor(cm, change, spans, selAfter) {
                                            var doc = cm.doc, display = cm.display, from = change.from, to = change.to;
                                        
                                            var recomputeMaxLength = false, checkWidthStart = from.line;
                                            if (!cm.options.lineWrapping) {
                                        Severity: Minor
                                        Found in assets/javascripts/codemirror/codemirror.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language