Hirse/brackets-outline-list

View on GitHub

Showing 905 of 905 total issues

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

  pp.readRegexp = function() {
    var escaped, inClass, start = this.pos;
    for (;;) {
      if (this.pos >= this.input.length) { this.raise(start, "Unterminated regular expression"); }
      var ch = this.input.charAt(this.pos);
Severity: Minor
Found in thirdparty/espree.js - About 1 hr to fix

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

              } else if (this.is_NUM()) {
                this.consume_LNUM();
                return this.tok.T_DNUMBER;
              } else {
                this.unput(ch ? 2 : 1);
    Severity: Major
    Found in thirdparty/php-parser.js and 1 other location - About 1 hr to fix
    thirdparty/php-parser.js on lines 3469..3475

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

    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(Buffer.prototype, 'parent', {
      enumerable: true,
      get: function () {
        if (!Buffer.isBuffer(this)) return undefined
        return this.buffer
    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 245..251

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

    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

        '%': function() {
          if (this._input[this.offset] === '=') {
            this.input();
            return this.tok.T_MOD_EQUAL;
          }
    Severity: Major
    Found in thirdparty/php-parser.js and 2 other locations - About 1 hr to fix
    thirdparty/php-parser.js on lines 4214..4220
    thirdparty/php-parser.js on lines 4401..4407

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

    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(Buffer.prototype, 'offset', {
      enumerable: true,
      get: function () {
        if (!Buffer.isBuffer(this)) return undefined
        return this.byteOffset
    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 237..243

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

    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.is_NUM()) {
                  this.consume_LNUM();
                  return this.tok.T_DNUMBER;
                } else {
                  this.unput(ch ? 3 : 2);
    Severity: Major
    Found in thirdparty/php-parser.js and 1 other location - About 1 hr to fix
    thirdparty/php-parser.js on lines 3476..3482

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

    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 (prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow)
    Severity: Major
    Found in thirdparty/espree.js and 2 other locations - About 1 hr to fix
    thirdparty/espree.js on lines 7308..7310
    thirdparty/htmlparser2.js on lines 3672..3676

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

    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

        return (c === CharCodes.Space ||
            c === CharCodes.NewLine ||
            c === CharCodes.Tab ||
            c === CharCodes.FormFeed ||
            c === CharCodes.CarriageReturn);
    Severity: Major
    Found in thirdparty/htmlparser2.js and 2 other locations - About 1 hr to fix
    thirdparty/espree.js on lines 3090..3090
    thirdparty/espree.js on lines 7308..7310

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

    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

            } else if (type === tt.semi || type === tt.comma ||
                     type === tt.parenL || type === tt.parenR ||
                     type === tt.braceL || type === tt.braceR ||
    Severity: Major
    Found in thirdparty/espree.js and 2 other locations - About 1 hr to fix
    thirdparty/espree.js on lines 3090..3090
    thirdparty/htmlparser2.js on lines 3672..3676

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

    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

        '/': function() {
          if (this._input[this.offset] === '=') {
            this.input();
            return this.tok.T_DIV_EQUAL;
          }
    Severity: Major
    Found in thirdparty/php-parser.js and 2 other locations - About 1 hr to fix
    thirdparty/php-parser.js on lines 4372..4378
    thirdparty/php-parser.js on lines 4401..4407

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

    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

        '^': function() {
          if (this._input[this.offset] === '=') {
            this.input();
            return this.tok.T_XOR_EQUAL;
          }
    Severity: Major
    Found in thirdparty/php-parser.js and 2 other locations - About 1 hr to fix
    thirdparty/php-parser.js on lines 4214..4220
    thirdparty/php-parser.js on lines 4372..4378

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

    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 a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

    define(function JavaScript(require, exports, module) {
        "use strict";
    
        var Parser = require("src/lexers/JSParser");
    
    
    Severity: Minor
    Found in src/languages/JavaScript.js - About 1 hr 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 113 has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{}],113:[function(require,module,exports){
    /*!
     * Copyright (C) 2017 Glayzzle (BSD3 License)
     * @authors https://github.com/glayzzle/php-parser/graphs/contributors
     * @url http://glayzzle.com
    Severity: Minor
    Found in thirdparty/php-parser.js - About 1 hr to fix

      Function concat has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Buffer.concat = function concat (list, length) {
        if (!Array.isArray(list)) {
          throw new TypeError('"list" argument must be an Array of Buffers')
        }
      
      
      Severity: Minor
      Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

        Function getRssFeed has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function getRssFeed(feedRoot) {
            var _a, _b;
            var childs = (_b = (_a = getOneElement("channel", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];
            var feed = {
                type: feedRoot.name.substr(0, 3),
        Severity: Minor
        Found in thirdparty/htmlparser2.js - About 1 hr to fix

          Function constructor has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            constructor(message, line, column, source, file, plugin) {
              super(message)
              this.name = 'CssSyntaxError'
              this.reason = message
          
          
          Severity: Minor
          Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

            Function determineBranch has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function determineBranch(decodeTree, current, nodeIdx, char) {
                var branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
                var jumpOffset = current & BinTrieFlags.JUMP_TABLE;
                // Case 1: Single branch encoded in jump offset
                if (branchCount === 0) {
            Severity: Minor
            Found in thirdparty/htmlparser2.js - About 1 hr to fix

              Function parseClass has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                pp$8.parseClass = function(node, isStatement) {
                  this.next();
              
                  // ecma-262 14.6 Class Definitions
                  // A class definition is always strict mode code.
              Severity: Minor
              Found in thirdparty/espree.js - About 1 hr to fix

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

                function isHexadecimalCharacter(code) {
                    return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) ||
                        (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F));
                }
                Severity: Major
                Found in thirdparty/htmlparser2.js and 1 other location - About 1 hr to fix
                thirdparty/htmlparser2.js on lines 3681..3684

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 56.

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

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

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

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

                Refactorings

                Further Reading

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

                      if (ch === 92) { // '\'
                        out += this.input.slice(chunkStart, this.pos);
                        out += this.readEscapedChar(false);
                        chunkStart = this.pos;
                      } else if (ch === 0x2028 || ch === 0x2029) {
                Severity: Major
                Found in thirdparty/espree.js and 1 other location - About 1 hr to fix
                thirdparty/espree.js on lines 6509..6533

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 56.

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

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

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

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

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language