Hirse/brackets-outline-list

View on GitHub

Showing 905 of 905 total issues

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

          if (this.token === this.tok.T_STRING || (this.php7 && this.is('IDENTIFIER'))) {
            name = this.text();
            this.next();
          } else {
            this.expect('IDENTIFIER');
Severity: Major
Found in thirdparty/php-parser.js and 1 other location - About 2 hrs to fix
thirdparty/php-parser.js on lines 6202..6207

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

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.token === this.tok.T_STRING || (this.php7 && this.is('IDENTIFIER'))) {
          name = this.text();
          this.next();
        } else {
          this.error('IDENTIFIER');
Severity: Major
Found in thirdparty/php-parser.js and 1 other location - About 2 hrs to fix
thirdparty/php-parser.js on lines 5243..5248

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

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

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

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

Severity: Major
Found in src/languages/JavaScript.js - About 2 hrs to fix

    Function utf8ToBytes has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function utf8ToBytes (string, units) {
      units = units || Infinity
      var codePoint
      var length = string.length
      var leadSurrogate = null
    Severity: Major
    Found in thirdparty/postcss-safe-parser.js - About 2 hrs to fix

      Function parseParenAndDistinguishExpression has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        pp$5.parseParenAndDistinguishExpression = function(canBeArrow, forInit) {
          var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;
          if (this.options.ecmaVersion >= 6) {
            this.next();
      
      
      Severity: Major
      Found in thirdparty/espree.js - About 2 hrs to fix

        Function parseClassElement has 58 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          pp$8.parseClassElement = function(constructorAllowsSuper) {
            if (this.eat(types$1.semi)) { return null }
        
            var ecmaVersion = this.options.ecmaVersion;
            var node = this.startNode();
        Severity: Major
        Found in thirdparty/espree.js - About 2 hrs to fix

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

            while (--i >= 0 && (mul *= 0x100)) {
              if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
                sub = 1
              }
              this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
          Severity: Major
          Found in thirdparty/postcss-safe-parser.js and 1 other location - About 2 hrs to fix
          thirdparty/postcss-safe-parser.js on lines 1566..1571

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

          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 (++i < byteLength && (mul *= 0x100)) {
              if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
                sub = 1
              }
              this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
          Severity: Major
          Found in thirdparty/postcss-safe-parser.js and 1 other location - About 2 hrs to fix
          thirdparty/postcss-safe-parser.js on lines 1589..1594

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

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

          AST.prototype.resolvePrecedence = function(result) {
            var buffer;
            // handling precendence
            if (result.kind === 'bin') {
              if (result.right) {
          Severity: Major
          Found in thirdparty/php-parser.js - About 2 hrs to fix

            Function error has 57 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              error(message, line, column, opts = {}) {
                let result, endLine, endColumn
            
                if (line && typeof line === 'object') {
                  let start = line
            Severity: Major
            Found in thirdparty/postcss-safe-parser.js - About 2 hrs to fix

              Function parseSubscript has 57 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                pp$5.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) {
                  var optionalSupported = this.options.ecmaVersion >= 11;
                  var optional = optionalSupported && this.eat(types$1.questionDot);
                  if (noCalls && optional) { this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions"); }
              
              
              Severity: Major
              Found in thirdparty/espree.js - About 2 hrs to fix

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

                  consume_LABEL: function() {
                    while(this.offset < this.size) {
                      var ch = this.input();
                      if (!this.is_LABEL()) {
                        if (ch) this.unput(1);
                Severity: Major
                Found in thirdparty/php-parser.js and 1 other location - About 2 hrs to fix
                thirdparty/php-parser.js on lines 4477..4486

                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

                  then(onFulfilled, onRejected) {
                    if (process.env.NODE_ENV !== 'production') {
                      if (!('from' in this.opts)) {
                        warnOnce(
                          'Without `from` option PostCSS could generate wrong source map ' +
                Severity: Major
                Found in thirdparty/postcss-safe-parser.js and 1 other location - About 2 hrs to fix
                thirdparty/postcss-safe-parser.js on lines 4212..4224

                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

                  then(onFulfilled, onRejected) {
                    if (process.env.NODE_ENV !== 'production') {
                      if (!('from' in this._opts)) {
                        warnOnce(
                          'Without `from` option PostCSS could generate wrong source map ' +
                Severity: Major
                Found in thirdparty/postcss-safe-parser.js and 1 other location - About 2 hrs to fix
                thirdparty/postcss-safe-parser.js on lines 3571..3582

                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

                  consume_TABSPACE: function() {
                    while(this.offset < this.size) {
                      var ch = this.input();
                      if (!this.is_TABSPACE()) {
                        if (ch) this.unput(1);
                Severity: Major
                Found in thirdparty/php-parser.js and 1 other location - About 2 hrs to fix
                thirdparty/php-parser.js on lines 4450..4459

                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

                Function _traverse has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function _traverse(node, list, level) {
                        if (node.kind === "class") {
                            list.push({
                                type: "class",
                                name: node.name,
                Severity: Major
                Found in src/lexers/PHPLexer.js - About 2 hrs to fix

                  Function read_encapsed_string_item has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    ,read_encapsed_string_item: function() {
                      var result = this.node();
                  
                      // plain text
                      // https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L1222
                  Severity: Major
                  Found in thirdparty/php-parser.js - About 2 hrs to fix

                    Function 101 has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    },{"./parser/array.js":101,"./parser/class.js":102,"./parser/comment.js":103,"./parser/expr.js":104,"./parser/function.js":105,"./parser/if.js":106,"./parser/loops.js":107,"./parser/main.js":108,"./parser/namespace.js":109,"./parser/scalar.js":110,"./parser/statement.js":111,"./parser/switch.js":112,"./parser/try.js":113,"./parser/utils.js":114,"./parser/variable.js":115}],101:[function(require,module,exports){
                    /*!
                     * Copyright (C) 2017 Glayzzle (BSD3 License)
                     * @authors https://github.com/glayzzle/php-parser/graphs/contributors
                     * @url http://glayzzle.com
                    Severity: Major
                    Found in thirdparty/php-parser.js - About 2 hrs to fix

                      Function cloneNode has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function cloneNode(node, recursive) {
                          if (recursive === void 0) { recursive = false; }
                          var result;
                          if (isText(node)) {
                              result = new Text(node.data);
                      Severity: Major
                      Found in thirdparty/htmlparser2.js - About 2 hrs to fix

                        Function 15 has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        },{"./decode_codepoint.js":15,"./generated/decode-data-html.js":18,"./generated/decode-data-xml.js":19}],15:[function(require,module,exports){
                        "use strict";
                        // Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134
                        var _a;
                        Object.defineProperty(exports, "__esModule", { value: true });
                        Severity: Major
                        Found in thirdparty/htmlparser2.js - About 2 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language