jbox-web/redmine_bootstrap_kit

View on GitHub

Showing 361 of 361 total issues

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

    on(d.scrollbarH, "scroll", function() {
      if (d.scroller.clientHeight) setScrollLeft(cm, d.scrollbarH.scrollLeft);
    });
Severity: Minor
Found in assets/javascripts/codemirror/codemirror.js and 1 other location - About 35 mins to fix
assets/javascripts/codemirror/codemirror.js on lines 1580..1582

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

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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

      if (alreadyCalled) {
        state.tokenize.pop();
        return state.tokenize[state.tokenize.length-1](stream, state);
      }
Severity: Minor
Found in assets/javascripts/codemirror/mode/ruby/ruby.js and 1 other location - About 35 mins to fix
assets/javascripts/codemirror/mode/ruby/ruby.js on lines 128..131

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

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

    if (needsV) {
      d.scrollbarV.style.display = "block";
      d.scrollbarV.style.bottom = needsH ? scrollbarWidth(d.measure) + "px" : "0";
      d.scrollbarV.firstChild.style.height =
        (scrollHeight - d.scroller.clientHeight + d.scrollbarV.clientHeight) + "px";
Severity: Minor
Found in assets/javascripts/codemirror/codemirror.js and 1 other location - About 35 mins to fix
assets/javascripts/codemirror/codemirror.js on lines 343..351

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

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

    { keys: ['Y'], type: 'operatorMotion', operator: 'yank',
        motion: 'moveToEol', motionArgs: { inclusive: true },
        operatorMotionArgs: { visualLine: true }},
Severity: Major
Found in assets/javascripts/codemirror/keymap/vim.js and 3 other locations - About 35 mins to fix
assets/javascripts/codemirror/keymap/vim.js on lines 229..231
assets/javascripts/codemirror/keymap/vim.js on lines 232..234
assets/javascripts/codemirror/keymap/vim.js on lines 238..241

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

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

    { keys: ['g', 'g'], type: 'motion',
        motion: 'moveToLineOrEdgeOfDocument',
        motionArgs: { forward: false, explicitRepeat: true, linewise: true, toJumplist: true }},
Severity: Minor
Found in assets/javascripts/codemirror/keymap/vim.js and 1 other location - About 35 mins to fix
assets/javascripts/codemirror/keymap/vim.js on lines 137..140

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

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

    { keys: ['X'], type: 'operatorMotion', operator: 'delete',
        motion: 'moveByCharacters', motionArgs: { forward: false },
        operatorMotionArgs: { visualLine: true }},
Severity: Major
Found in assets/javascripts/codemirror/keymap/vim.js and 3 other locations - About 35 mins to fix
assets/javascripts/codemirror/keymap/vim.js on lines 232..234
assets/javascripts/codemirror/keymap/vim.js on lines 235..237
assets/javascripts/codemirror/keymap/vim.js on lines 238..241

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

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

Avoid too many return statements within this function.
Open

      return false;
Severity: Major
Found in assets/javascripts/codemirror/codemirror.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

          return;
    Severity: Major
    Found in assets/javascripts/codemirror/codemirror.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              if (done) return done;
      Severity: Major
      Found in assets/javascripts/codemirror/codemirror.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                      return;
        Severity: Major
        Found in assets/javascripts/codemirror/keymap/vim.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                return;
          Severity: Major
          Found in assets/javascripts/codemirror/codemirror.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  else return "L";
            Severity: Major
            Found in assets/javascripts/codemirror/codemirror.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  if (!start) {if (e_target(e) == display.scroller) e_preventDefault(e); return;}
              Severity: Major
              Found in assets/javascripts/codemirror/codemirror.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return {anchor: adjustPos(doc.sel.anchor), head: adjustPos(doc.sel.head)};
                Severity: Major
                Found in assets/javascripts/codemirror/codemirror.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return clipToLen(pos, change.text[inside].length + (inside ? 0 : change.from.ch));
                  Severity: Major
                  Found in assets/javascripts/codemirror/codemirror.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            if (!part) return null;
                    Severity: Major
                    Found in assets/javascripts/codemirror/codemirror.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return lookup(fallthrough);
                      Severity: Major
                      Found in assets/javascripts/codemirror/codemirror.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                              if (stream.eat("'")) return chain(readQuoted("'", "atom", false), stream, state);
                        Severity: Major
                        Found in assets/javascripts/codemirror/mode/ruby/ruby.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                return "operator";
                          Severity: Major
                          Found in assets/javascripts/codemirror/mode/ruby/ruby.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                  if (stream.eat(":")) return "atom";
                            Severity: Major
                            Found in assets/javascripts/codemirror/mode/ruby/ruby.js - About 30 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language