jbox-web/redmine_bootstrap_kit

View on GitHub

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

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

              if (a < Math.abs(c)) { a=c; var s=p/4; }
              else var s = p/(2*Math.PI) * Math.asin (c/a);
      Severity: Major
      Found in assets/javascripts/jquery_file_tree/jquery_easing.js and 2 other locations - About 1 hr to fix
      assets/javascripts/jquery_file_tree/jquery_easing.js on lines 122..123
      assets/javascripts/jquery_file_tree/jquery_easing.js on lines 129..130

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

      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 3 locations. Consider refactoring.
      Open

              if (a < Math.abs(c)) { a=c; var s=p/4; }
              else var s = p/(2*Math.PI) * Math.asin (c/a);
      Severity: Major
      Found in assets/javascripts/jquery_file_tree/jquery_easing.js and 2 other locations - About 1 hr to fix
      assets/javascripts/jquery_file_tree/jquery_easing.js on lines 122..123
      assets/javascripts/jquery_file_tree/jquery_easing.js on lines 136..137

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

      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 3 locations. Consider refactoring.
      Open

              if (a < Math.abs(c)) { a=c; var s=p/4; }
              else var s = p/(2*Math.PI) * Math.asin (c/a);
      Severity: Major
      Found in assets/javascripts/jquery_file_tree/jquery_easing.js and 2 other locations - About 1 hr to fix
      assets/javascripts/jquery_file_tree/jquery_easing.js on lines 129..130
      assets/javascripts/jquery_file_tree/jquery_easing.js on lines 136..137

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

      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

            display.inputDiv.style.top = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
                                                              headPos.top + lineOff.top - wrapOff.top)) + "px";
      Severity: Major
      Found in assets/javascripts/codemirror/codemirror.js and 1 other location - About 1 hr to fix
      assets/javascripts/codemirror/codemirror.js on lines 792..793

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

      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

            display.inputDiv.style.left = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
                                                               headPos.left + lineOff.left - wrapOff.left)) + "px";
      Severity: Major
      Found in assets/javascripts/codemirror/codemirror.js and 1 other location - About 1 hr to fix
      assets/javascripts/codemirror/codemirror.js on lines 790..791

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

      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

        function words(str) {
          var obj = {}, words = str.split(" ");
          for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
          return obj;
        }
      Severity: Major
      Found in assets/javascripts/codemirror/mode/nginx/nginx.js and 1 other location - About 1 hr to fix
      assets/javascripts/codemirror/mode/php/php.js on lines 2..6

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

      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

        function keywords(str) {
          var obj = {}, words = str.split(" ");
          for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
          return obj;
        }
      Severity: Major
      Found in assets/javascripts/codemirror/mode/php/php.js and 1 other location - About 1 hr to fix
      assets/javascripts/codemirror/mode/nginx/nginx.js on lines 3..7

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

      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 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
                            Severity
                            Category
                            Status
                            Source
                            Language