packages/miew-cli/src/MiewCLIParser.js

Summary

Maintainability
F
2 mos
Test Coverage

Function parser has 3026 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var parser = (function () {
  var o = function (k, v, o, l) {
      for (o = o || {}, l = k.length; l--; o[k[l]] = v);
      return o
    },
Severity: Major
Found in packages/miew-cli/src/MiewCLIParser.js - About 2 wks to fix

    File MiewCLIParser.js has 3029 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable */
    // DO NOT EDIT! Automatically generated from .jison
    /* parser generated by jison 0.4.18 */
    /*
      Returns a Parser object of the following structure:
    Severity: Major
    Found in packages/miew-cli/src/MiewCLIParser.js - About 1 wk to fix

      Function parser has a Cognitive Complexity of 231 (exceeds 5 allowed). Consider refactoring.
      Open

      var parser = (function () {
        var o = function (k, v, o, l) {
            for (o = o || {}, l = k.length; l--; o[k[l]] = v);
            return o
          },
      Severity: Minor
      Found in packages/miew-cli/src/MiewCLIParser.js - About 4 days to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function lexer has 652 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        var lexer = (function () {
          var lexer = {
            EOF: 1,
      
            parseError: function parseError(str, hash) {
      Severity: Major
      Found in packages/miew-cli/src/MiewCLIParser.js - About 3 days to fix

        Function anonymous has 346 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            performAction: function anonymous(
              yytext,
              yyleng,
              yylineno,
              yy,
        Severity: Major
        Found in packages/miew-cli/src/MiewCLIParser.js - About 1 day to fix

          Function anonymous has 248 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                performAction: function anonymous(
                  yy,
                  yy_,
                  $avoiding_name_collisions,
                  YY_START
          Severity: Major
          Found in packages/miew-cli/src/MiewCLIParser.js - About 1 day to fix

            Function parse has 182 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                parse: function parse(input) {
                  var self = this,
                    stack = [0],
                    tstack = [],
                    vstack = [null],
            Severity: Major
            Found in packages/miew-cli/src/MiewCLIParser.js - About 7 hrs to fix

              Function test_match has 68 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    test_match: function (match, indexed_rule) {
                      var token, lines, backup
              
                      if (this.options.backtrack_lexer) {
                        // save context
              Severity: Major
              Found in packages/miew-cli/src/MiewCLIParser.js - About 2 hrs to fix

                Function next has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      next: function () {
                        if (this.done) {
                          return this.EOF
                        }
                        if (!this._input) {
                Severity: Major
                Found in packages/miew-cli/src/MiewCLIParser.js - About 2 hrs to fix

                  Function unput has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        unput: function (ch) {
                          var len = ch.length
                          var lines = ch.split(/(?:\r\n?|\n)/g)
                  
                          this._input = ch + this._input
                  Severity: Minor
                  Found in packages/miew-cli/src/MiewCLIParser.js - About 1 hr to fix

                    Function performAction has 7 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                          yytext,
                          yyleng,
                          yylineno,
                          yy,
                          yystate /* action[1] */,
                    Severity: Major
                    Found in packages/miew-cli/src/MiewCLIParser.js - About 50 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                return this.parseError(
                                  'Lexical error on line ' +
                                    (this.yylineno + 1) +
                                    '. Unrecognized text.\n' +
                                    this.showPosition(),
                      Severity: Major
                      Found in packages/miew-cli/src/MiewCLIParser.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                  return this.EOF
                        Severity: Major
                        Found in packages/miew-cli/src/MiewCLIParser.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                    return false
                          Severity: Major
                          Found in packages/miew-cli/src/MiewCLIParser.js - About 30 mins to fix

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

                                parse: function parse(input) {
                                  var self = this,
                                    stack = [0],
                                    tstack = [],
                                    vstack = [null],
                            Severity: Major
                            Found in packages/miew-cli/src/MiewCLIParser.js and 1 other location - About 1 wk to fix
                            packages/miew/src/utils/SelectionParser.js on lines 265..448

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

                            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

                                  test_match: function (match, indexed_rule) {
                                    var token, lines, backup
                            
                                    if (this.options.backtrack_lexer) {
                                      // save context
                            Severity: Major
                            Found in packages/miew-cli/src/MiewCLIParser.js and 1 other location - About 4 days to fix
                            packages/miew/src/utils/SelectionParser.js on lines 608..682

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

                            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

                                  unput: function (ch) {
                                    var len = ch.length
                                    var lines = ch.split(/(?:\r\n?|\n)/g)
                            
                                    this._input = ch + this._input
                            Severity: Major
                            Found in packages/miew-cli/src/MiewCLIParser.js and 1 other location - About 2 days to fix
                            packages/miew/src/utils/SelectionParser.js on lines 509..544

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

                            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

                                  next: function () {
                                    if (this.done) {
                                      return this.EOF
                                    }
                                    if (!this._input) {
                            Severity: Major
                            Found in packages/miew-cli/src/MiewCLIParser.js and 1 other location - About 2 days to fix
                            packages/miew/src/utils/SelectionParser.js on lines 685..743

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

                            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

                                  setInput: function (input, yy) {
                                    this.yy = yy || this.yy || {}
                                    this._input = input
                                    this._more = this._backtrack = this.done = false
                                    this.yylineno = this.yyleng = 0
                            Severity: Major
                            Found in packages/miew-cli/src/MiewCLIParser.js and 1 other location - About 1 day to fix
                            packages/miew/src/utils/SelectionParser.js on lines 465..483

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

                            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

                                  input: function () {
                                    var ch = this._input[0]
                                    this.yytext += ch
                                    this.yyleng++
                                    this.offset++
                            Severity: Major
                            Found in packages/miew-cli/src/MiewCLIParser.js and 1 other location - About 1 day to fix
                            packages/miew/src/utils/SelectionParser.js on lines 486..506

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

                            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

                                  _currentRules: function _currentRules() {
                                    if (
                                      this.conditionStack.length &&
                                      this.conditionStack[this.conditionStack.length - 1]
                                    ) {
                            Severity: Major
                            Found in packages/miew-cli/src/MiewCLIParser.js and 1 other location - About 3 hrs to fix
                            packages/miew/src/utils/SelectionParser.js on lines 771..782

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

                            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

                                  upcomingInput: function () {
                                    var next = this.match
                                    if (next.length < 20) {
                                      next += this._input.substr(0, 20 - next.length)
                                    }
                            Severity: Major
                            Found in packages/miew-cli/src/MiewCLIParser.js and 1 other location - About 3 hrs to fix
                            packages/miew/src/utils/SelectionParser.js on lines 589..598

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

                            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

                                  reject: function () {
                                    if (this.options.backtrack_lexer) {
                                      this._backtrack = true
                                    } else {
                                      return this.parseError(
                            Severity: Major
                            Found in packages/miew-cli/src/MiewCLIParser.js and 1 other location - About 3 hrs to fix
                            packages/miew/src/utils/SelectionParser.js on lines 553..570

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

                            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

                                  pastInput: function () {
                                    var past = this.matched.substr(
                                      0,
                                      this.matched.length - this.match.length
                                    )
                            Severity: Major
                            Found in packages/miew-cli/src/MiewCLIParser.js and 1 other location - About 2 hrs to fix
                            packages/miew/src/utils/SelectionParser.js on lines 578..586

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

                            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

                                  showPosition: function () {
                                    var pre = this.pastInput()
                                    var c = new Array(pre.length + 1).join('-')
                                    return pre + this.upcomingInput() + '\n' + c + '^'
                                  },
                            Severity: Major
                            Found in packages/miew-cli/src/MiewCLIParser.js and 1 other location - About 2 hrs to fix
                            packages/miew/src/utils/SelectionParser.js on lines 601..605

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

                            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

                                  topState: function topState(n) {
                                    n = this.conditionStack.length - 1 - Math.abs(n || 0)
                                    if (n >= 0) {
                                      return this.conditionStack[n]
                                    } else {
                            Severity: Major
                            Found in packages/miew-cli/src/MiewCLIParser.js and 1 other location - About 2 hrs to fix
                            packages/miew/src/utils/SelectionParser.js on lines 785..792

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

                            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

                                  popState: function popState() {
                                    var n = this.conditionStack.length - 1
                                    if (n > 0) {
                                      return this.conditionStack.pop()
                                    } else {
                            Severity: Major
                            Found in packages/miew-cli/src/MiewCLIParser.js and 1 other location - About 1 hr to fix
                            packages/miew/src/utils/SelectionParser.js on lines 761..768

                            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

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

                              var o = function (k, v, o, l) {
                                  for (o = o || {}, l = k.length; l--; o[k[l]] = v);
                                  return o
                                },
                            Severity: Major
                            Found in packages/miew-cli/src/MiewCLIParser.js and 1 other location - About 1 hr to fix
                            packages/miew/src/utils/SelectionParser.js on lines 77..80

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

                            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

                                  lex: function lex() {
                                    var r = this.next()
                                    if (r) {
                                      return r
                                    } else {
                            Severity: Minor
                            Found in packages/miew-cli/src/MiewCLIParser.js and 1 other location - About 50 mins to fix
                            packages/miew/src/utils/SelectionParser.js on lines 746..753

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

                            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