Hirse/brackets-outline-list

View on GitHub

Showing 905 of 905 total issues

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

          while(this.token != this.EOF && this.token !== this.tok.T_DECLARE) {
            // @todo : check declare_statement from php / not valid
            body.push(this.read_top_statement());
          }
Severity: Major
Found in thirdparty/php-parser.js and 1 other location - About 1 hr to fix
thirdparty/php-parser.js on lines 7383..7386

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

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 (argumentsText) {
            var $arguments = $(document.createElement("span"));
            $arguments.addClass("outline-entry-xml-attributes");
            $arguments.text(argumentsText);
            $elements.push($arguments);
Severity: Major
Found in src/languages/XML.js and 1 other location - About 1 hr to fix
src/languages/Stylus.js on lines 33..38

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

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(this.token != this.EOF && this.token !== this.tok.T_ENDDECLARE) {
            // @todo : check declare_statement from php / not valid
            body.push(this.read_top_statement());
          }
Severity: Major
Found in thirdparty/php-parser.js and 1 other location - About 1 hr to fix
thirdparty/php-parser.js on lines 7400..7403

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

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

  prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit };
Severity: Major
Found in thirdparty/espree.js and 1 other location - About 1 hr to fix
thirdparty/espree.js on lines 1382..1382

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

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

  prev() {
    if (!this.parent) return undefined
    let index = this.parent.index(this)
    return this.parent.nodes[index - 1]
  }
Severity: Major
Found in thirdparty/postcss-safe-parser.js and 1 other location - About 1 hr to fix
thirdparty/postcss-safe-parser.js on lines 4405..4409

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

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() {
    if (!this.parent) return undefined
    let index = this.parent.index(this)
    return this.parent.nodes[index + 1]
  }
Severity: Major
Found in thirdparty/postcss-safe-parser.js and 1 other location - About 1 hr to fix
thirdparty/postcss-safe-parser.js on lines 4440..4444

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

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 lex has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

lexer.prototype.lex = function() {
  this.yylloc.prev_offset = this.offset;
  this.yylloc.prev_line = this.yylloc.last_line;
  this.yylloc.prev_column = this.yylloc.last_column;
  var token = this.next() || this.lex();
Severity: Minor
Found in thirdparty/php-parser.js - About 1 hr to fix

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

    },{"./foreignNames.js":1,"domelementtype":3,"entities":21}],3:[function(require,module,exports){
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;
    /** Types of elements found in htmlparser2's DOM */
    Severity: Minor
    Found in thirdparty/htmlparser2.js - About 1 hr to fix

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

      },{}],35:[function(require,module,exports){
      'use strict'
      
      class Warning {
        constructor(text, opts = {}) {
      Severity: Minor
      Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

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

          pp$7.checkLValSimple = function(expr, bindingType, checkClashes) {
            if ( bindingType === void 0 ) bindingType = BIND_NONE;
        
            var isBind = bindingType !== BIND_NONE;
        
        
        Severity: Minor
        Found in thirdparty/espree.js - About 1 hr to fix

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

                          if (what.loc && what.value[0].loc) {
                            what.loc.start = what.value[0].loc.start;
                          }
          Severity: Major
          Found in thirdparty/php-parser.js and 1 other location - About 1 hr to fix
          thirdparty/php-parser.js on lines 7904..7906

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

          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 (ecmaVersion >= 12) {
                    var next2$1 = this.input.charCodeAt(this.pos + 2);
                    if (next2$1 === 61) { return this.finishOp(types$1.assign, 3) }
                  }
          Severity: Major
          Found in thirdparty/espree.js and 1 other location - About 1 hr to fix
          thirdparty/espree.js on lines 6104..6107

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

          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 (what.loc && what.value[0].loc) {
                            what.loc.start = what.value[0].loc.start;
                          }
          Severity: Major
          Found in thirdparty/php-parser.js and 1 other location - About 1 hr to fix
          thirdparty/php-parser.js on lines 7914..7916

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

          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 (this.options.ecmaVersion >= 12) {
                  var next2 = this.input.charCodeAt(this.pos + 2);
                  if (next2 === 61) { return this.finishOp(types$1.assign, 3) }
                }
          Severity: Major
          Found in thirdparty/espree.js and 1 other location - About 1 hr to fix
          thirdparty/espree.js on lines 6174..6177

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

          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 read_encaps_var_offset has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            ,read_encaps_var_offset: function() {
              var offset = this.node();
              if (this.token === this.tok.T_STRING) {
                var text = this.text();
                var isDblQuote = text[0] === '"';
          Severity: Minor
          Found in thirdparty/php-parser.js - About 1 hr to fix

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

            function any(arr) {
              var P = this;
              return new P(function(resolve, reject) {
                if (!(arr && typeof arr.length !== 'undefined')) {
                  return reject(new TypeError('Promise.any accepts an array'));
            Severity: Minor
            Found in thirdparty/promise.js - About 1 hr to fix

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

                  EntityDecoder.prototype.stateNamedEntity = function (str, offset) {
                      var decodeTree = this.decodeTree;
                      var current = decodeTree[this.treeIndex];
                      // The mask is the number of bytes of the value, including the current byte.
                      var valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
              Severity: Minor
              Found in thirdparty/htmlparser2.js - About 1 hr to fix

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

                    Tokenizer.prototype.stateBeforeTagName = function (c) {
                        if (c === CharCodes.ExclamationMark) {
                            this.state = State.BeforeDeclaration;
                            this.sectionStart = this.index + 1;
                        }
                Severity: Minor
                Found in thirdparty/htmlparser2.js - About 1 hr to fix

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

                  function parse(css, opts) {
                    let input = new Input(css, opts)
                    let parser = new Parser(input)
                    try {
                      parser.parse()
                  Severity: Minor
                  Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

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

                      parse() {
                        let token
                        while (!this.tokenizer.endOfFile()) {
                          token = this.tokenizer.nextToken()
                    
                    
                    Severity: Minor
                    Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language