SiLeBAT/FSK-Lab

View on GitHub
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js

Summary

Maintainability
F
1 wk
Test Coverage

File stylus.js has 615 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

// Stylus mode created by Dmitry Kiselyov http://git.io/AaRB

Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 1 day to fix

Function block has 117 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    states.block = function(type, stream, state) {
      if ((type == "comment" && startOfLine(stream)) ||
          (type == "," && endOfLine(stream)) ||
          type == "mixin") {
        return pushContext(state, stream, "block", 0);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 4 hrs to fix

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

    function tokenBase(stream, state) {
      firstWordMatch = stream.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/);
      state.context.line.firstWord = firstWordMatch ? firstWordMatch[0].replace(/^\s*/, "") : "";
      state.context.line.indent = stream.indentation();
      ch = stream.peek();
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 3 hrs to fix

Consider simplifying this complex logical expression.
Open

        if (cx.prev &&
            (ch == "}" && (cx.type == "block" || cx.type == "atBlock" || cx.type == "keyframes") ||
             ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||
             ch == "{" && (cx.type == "at"))) {
          indent = cx.indent - indentUnit;
Severity: Critical
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 2 hrs to fix

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

      indent: function(state, textAfter, line) {

        var cx = state.context,
            ch = textAfter && textAfter.charAt(0),
            indent = cx.indent,
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 1 hr to fix

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

    states.parens = function(type, stream, state) {
      if (type == "(") return pushContext(state, stream, "parens");
      if (type == ")") {
        if (state.context.prev.type == "parens") {
          return popContext(state);
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

          if (/@|\$|\d/.test(ch) ||
              /^\{/.test(textAfter) ||
/^\s*\/(\/|\*)/.test(textAfter) ||
              /^\s*\/\*/.test(prevLineFirstWord) ||
              /^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(textAfter) ||
Severity: Critical
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 1 hr to fix

Function atBlock has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    states.atBlock = function(type, stream, state) {
      if (type == "(") return pushContext(state, stream, "atBlock_parens");
      if (typeIsBlock(type, stream)) {
        return pushContext(state, stream, "block");
      }
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 1 hr to fix

Function keyframes has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    states.keyframes = function(type, stream, state) {
      if (stream.indentation() == "0" && ((type == "}" && startOfLine(stream)) || type == "]" || type == "hash"
                                          || type == "qualifier" || wordIsTag(stream.current()))) {
        return popAndPass(type, stream, state);
      }
Severity: Minor
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

      if (stream.indentation() == "0" && ((type == "}" && startOfLine(stream)) || type == "]" || type == "hash"
                                          || type == "qualifier" || wordIsTag(stream.current()))) {
        return popAndPass(type, stream, state);
      }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 1 hr to fix

Avoid deeply nested control flow statements.
Open

              if (wordIsBlock(firstWordOfLine(stream)))  return "block";
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 45 mins to fix

Consider simplifying this complex logical expression.
Open

        if ((stream.string.match(/^[a-z][\w-]*\(/i) && endOfLine(stream)) ||
            wordIsBlock(firstWordOfLine(stream)) ||
            /(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(firstWordOfLine(stream)) ||
            (!stream.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/) &&
             wordIsTag(firstWordOfLine(stream)))) {
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 40 mins to fix

Avoid too many return statements within this function.
Open

        return pushContext(state, stream, endOfLine(stream) ? "block" : "atBlock");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return ["property", "word"];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

          return pushContext(state, stream, "block", 0);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return [null, ch];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

          return pushContext(state, stream, "variableName", 0);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return ["meta", "vendor-prefixes"];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return [stream.match(/^(important|optional)/i) ? "keyword": "operator", "important"];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return pushContext(state, stream, "block");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

          return pushContext(state, stream, "block");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return ["keyword", "mixin"];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return ["operator", "operator"];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return pushContext(state, stream, "pseudo");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

          return ["builtin", "hash"];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return ["keyword", "block-mixin"];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return ["variable-3", "reference"];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return ["qualifier", "qualifier"];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

          return pushContext(state, stream, "variableName");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return pushContext(state, stream, "extend", 0);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return pushContext(state, stream, "vendorPrefixes");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

          return pushContext(state, stream, "block");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

      return state.context.type;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

      return state.context.type;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return ["number", "unit"];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

          return "block";
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

          return pushContext(state, stream, "keyframes");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        if (endOfLine(stream)) return pushContext(state, stream, "block");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

      return state.context.type;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

          return ["atom", "atom"];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return pushContext(state, stream, "block", 0);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

              return "block";
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

              if (wordIsBlock(firstWordOfLine(stream)))  return "block";
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return pushContext(state, stream, "block", 0);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return pushContext(state, stream, "block");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return ["variable-3", "reference"];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return ["operator", stream.current()];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return pushContext(state, stream, "pseudo");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return pushContext(state, stream, "keyframes");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return pushContext(state, stream, "block");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

            return pushContext(state, stream, "block", 0);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

            return "block";
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

      return state.context.type;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

            return ["variable-2", "variable-name"];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return ["variable-2", "word"];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

          return pushContext(state, stream, "block", 0);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        if (word == "return") return pushContext(state, stream, "block", 0);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return pushContext(state, stream, "keyframes");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

            return "block";
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

          if (endOfLine(stream)) return pushContext(state, stream, "block");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return pushContext(state, stream, "parens");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

      return state.context.type;
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

      return [null, null];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

              return pushContext(state, stream, "block", 0);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

          return pushContext(state, stream, "block");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        else return pushContext(state, stream, "block", 0);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return pushContext(state, stream, endOfLine(stream) ? "block" : "atBlock");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

            return "block";
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return pushContext(state, stream, "variableName");
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

      return states.atBlock(type, stream, state);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

        return ["qualifier", "qualifier"];
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/stylus/stylus.js - About 30 mins to fix

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

  var colorKeywords_ = ["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"];
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/css/css.js on lines 563..590

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

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 tokenCComment(stream, state) {
      var maybeEnd = false, ch;
      while ((ch = stream.next()) != null) {
        if (maybeEnd && ch == "/") {
          state.tokenize = null;
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/css/css.js on lines 694..704

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

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

        while ((ch = stream.next()) != null) {
          if (ch == quote && !escaped) {
            if (quote == ")") stream.backUp(1);
            break;
          }
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/css/css.js on lines 96..102

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

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

    function popAndPass(type, stream, state, n) {
      for (var i = n || 1; i > 0; i--)
        state.context = state.context.prev;
      return pass(type, stream, state);
    }
de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/mode/css/css.js on lines 139..143

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

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

There are no issues that match your filters.

Category
Status