Hirse/brackets-outline-list

View on GitHub

Showing 905 of 905 total issues

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

      case this.tok.T_ECHO:
        var result = this.node('echo');
        var args = this.next().read_list(this.read_expr, ',');
        this.expectEndOfStatement();
        return result(args);
Severity: Major
Found in thirdparty/php-parser.js and 1 other location - About 1 hr to fix
thirdparty/php-parser.js on lines 7331..7335

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    if (this.token !== ')') {
      increment = this.read_list(this.read_expr, ',');
      if (this.expect(')')) this.next();
    } else {
      this.next();
Severity: Major
Found in thirdparty/php-parser.js and 2 other locations - About 1 hr to fix
thirdparty/php-parser.js on lines 6547..6552
thirdparty/php-parser.js on lines 6553..6558

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    if (this.token !== ';') {
      init = this.read_list(this.read_expr, ',');
      if (this.expect(';')) this.next();
    } else {
      this.next();
Severity: Major
Found in thirdparty/php-parser.js and 2 other locations - About 1 hr to fix
thirdparty/php-parser.js on lines 6553..6558
thirdparty/php-parser.js on lines 6559..6564

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    if (this.token !== ';') {
      test = this.read_list(this.read_expr, ',');
      if (this.expect(';')) this.next();
    } else {
      this.next();
Severity: Major
Found in thirdparty/php-parser.js and 2 other locations - About 1 hr to fix
thirdparty/php-parser.js on lines 6547..6552
thirdparty/php-parser.js on lines 6559..6564

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

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

      case this.tok.T_GLOBAL:
        var result = this.node('global');
        var items = this.next().read_list(this.read_simple_variable, ',');
        this.expectEndOfStatement();
        return result(items);
Severity: Major
Found in thirdparty/php-parser.js and 1 other location - About 1 hr to fix
thirdparty/php-parser.js on lines 7354..7358

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

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

define(function CSS(require, exports, module) {
    "use strict";

    var Parser = require("src/lexers/CSSParser");

Severity: Minor
Found in src/languages/CSS.js - About 1 hr to fix

    Function read_trait_use_alias has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      ,read_trait_use_alias: function() {
        var node = this.node();
        var trait = null;
        var method;
    
    
    Severity: Minor
    Found in thirdparty/php-parser.js - About 1 hr to fix

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

      lexer.prototype.next = function () {
        var token;
        if (!this._input) {
          this.done = true;
        }
      Severity: Minor
      Found in thirdparty/php-parser.js - About 1 hr to fix

        Function slowToString has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function slowToString (encoding, start, end) {
          var loweredCase = false
        
          // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
          // property of a typed array.
        Severity: Minor
        Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

          Function normalize has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            normalize(nodes, sample) {
              if (typeof nodes === 'string') {
                nodes = cleanSource(parse(nodes).nodes)
              } else if (Array.isArray(nodes)) {
                nodes = nodes.slice(0)
          Severity: Minor
          Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

            Function parseMaybeUnary has 44 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) {
                var startPos = this.start, startLoc = this.startLoc, expr;
                if (this.isContextual("await") && this.canAwait) {
                  expr = this.parseAwait(forInit);
                  sawUnary = true;
            Severity: Minor
            Found in thirdparty/espree.js - About 1 hr to fix

              Function parseForStatement has 44 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                pp$8.parseForStatement = function(node) {
                  this.next();
                  var awaitAt = (this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await")) ? this.lastTokStart : -1;
                  this.labels.push(loopLabel);
                  this.enterScope(0);
              Severity: Minor
              Found in thirdparty/espree.js - About 1 hr to fix

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

                    Object.defineProperty(Element.prototype, "tagName", {
                        // DOM Level 1 aliases
                        /**
                         * Same as {@link name}.
                         * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
                Severity: Major
                Found in thirdparty/htmlparser2.js and 1 other location - About 1 hr to fix
                thirdparty/htmlparser2.js on lines 634..648

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

                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

                    Object.defineProperty(Node.prototype, "parentNode", {
                        // Read-write aliases for properties
                        /**
                         * Same as {@link parent}.
                         * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
                Severity: Major
                Found in thirdparty/htmlparser2.js and 1 other location - About 1 hr to fix
                thirdparty/htmlparser2.js on lines 898..912

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

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

                exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
                  var e, m, c
                  var eLen = (nBytes * 8) - mLen - 1
                  var eMax = (1 << eLen) - 1
                  var eBias = eMax >> 1
                Severity: Minor
                Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

                  Function allSettled has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

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

                            parse() {
                                const extra = this[STATE];
                                const program = super.parse();
                    
                                program.sourceType = extra.originalSourceType;
                    Severity: Minor
                    Found in thirdparty/espree.js - About 1 hr to fix

                      Function Parser has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        var Parser = function Parser(options, input, startPos) {
                          this.options = options = getOptions(options);
                          this.sourceFile = options.sourceFile;
                          this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]);
                          var reserved = "";
                      Severity: Minor
                      Found in thirdparty/espree.js - About 1 hr to fix

                        Function readTmplToken has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          pp.readTmplToken = function() {
                            var out = "", chunkStart = this.pos;
                            for (;;) {
                              if (this.pos >= this.input.length) { this.raise(this.start, "Unterminated template"); }
                              var ch = this.input.charCodeAt(this.pos);
                        Severity: Minor
                        Found in thirdparty/espree.js - About 1 hr to fix

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

                          Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
                            offset = offset >>> 0
                            if (!noAssert) checkOffset(offset, 8, this.length)
                            return ieee754.read(this, offset, true, 52, 8)
                          }
                          Severity: Major
                          Found in thirdparty/postcss-safe-parser.js and 3 other locations - About 1 hr to fix
                          thirdparty/postcss-safe-parser.js on lines 1437..1441
                          thirdparty/postcss-safe-parser.js on lines 1443..1447
                          thirdparty/postcss-safe-parser.js on lines 1455..1459

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

                          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

                          Severity
                          Category
                          Status
                          Source
                          Language