Hirse/brackets-outline-list

View on GitHub

Showing 905 of 905 total issues

Function getTokenFromCode has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  pp.getTokenFromCode = function(code) {
    switch (code) {
    // The interpretation of a dot depends on whether it is followed
    // by a digit or another two dots.
    case 46: // '.'
Severity: Minor
Found in thirdparty/espree.js - About 1 hr to fix

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

          if (i.nodes && (i.parent !== root || root.first !== i)) {
            if (typeof i.raws.before !== 'undefined') {
              value = i.raws.before
              if (value.includes('\n')) {
                value = value.replace(/[^\n]+$/, '')
    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 5916..5924

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

    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 (i.nodes && i.nodes.length > 0) {
            if (typeof i.raws.after !== 'undefined') {
              value = i.raws.after
              if (value.includes('\n')) {
                value = value.replace(/[^\n]+$/, '')
    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 5982..5990

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

    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 (isNewLine(ch)) {
                out += this.input.slice(chunkStart, this.pos);
                out += this.jsx_readNewLine(true);
                chunkStart = this.pos;
              } else {
    Severity: Major
    Found in thirdparty/espree.js and 1 other location - About 1 hr to fix
    thirdparty/espree.js on lines 219..225

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

    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

            } else if (isNewLine(ch)) {
              out += this.input.slice(chunkStart, this.pos);
              out += this.jsx_readNewLine(false);
              chunkStart = this.pos;
            } else {
    Severity: Major
    Found in thirdparty/espree.js and 1 other location - About 1 hr to fix
    thirdparty/espree.js on lines 179..185

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

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

    define(function CSSParser(require, exports, module) {
        "use strict";
    
        var postcss = require("thirdparty/postcss-safe-parser");
    
    
    Severity: Minor
    Found in src/lexers/CSSParser.js - About 1 hr to fix

      Function Element has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var Element = /** @class */ (function (_super) {
          __extends(Element, _super);
          /**
           * @param name Name of the tag, eg. `div`, `span`.
           * @param attribs Object mapping attribute names to attribute values.
      Severity: Minor
      Found in thirdparty/htmlparser2.js - About 1 hr to fix

        Function PHP has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

        define(function PHP(require, exports, module) {
            "use strict";
        
            var Lexer = require("src/lexers/PHPLexer");
        
        
        Severity: Minor
        Found in src/languages/PHP.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

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

        function nextElementSibling(elem) {
            var _a;
            var next = elem.next;
            while (next !== null && !(0, domhandler_1.isTag)(next))
                (_a = next, next = _a.next);
        Severity: Major
        Found in thirdparty/htmlparser2.js and 1 other location - About 1 hr to fix
        thirdparty/htmlparser2.js on lines 2100..2106

        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

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

        function prevElementSibling(elem) {
            var _a;
            var prev = elem.prev;
            while (prev !== null && !(0, domhandler_1.isTag)(prev))
                (_a = prev, prev = _a.prev);
        Severity: Major
        Found in thirdparty/htmlparser2.js and 1 other location - About 1 hr to fix
        thirdparty/htmlparser2.js on lines 2084..2090

        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

        Function Stylus has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        define(function Stylus(require, exports, module) {
            "use strict";
        
            /**
             * Get the type class based on the the function name.
        Severity: Minor
        Found in src/languages/Stylus.js - About 1 hr to fix

          Function read_class_body has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            ,read_class_body: function() {
              var result = [];
          
              while(this.token !== this.EOF && this.token !== '}') {
          
          
          Severity: Minor
          Found in thirdparty/php-parser.js - About 1 hr to fix

            Function rangeBy has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              rangeBy(opts) {
                let start = {
                  column: this.source.start.column,
                  line: this.source.start.line
                }
            Severity: Minor
            Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

              Function read_function_declaration has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                ,read_function_declaration: function(type, isStatic) {
                  var nodeName = 'function';
                  if (type === 1) {
                    nodeName = 'closure';
                  } else if (type === 2) {
              Severity: Minor
              Found in thirdparty/php-parser.js - About 1 hr to fix

                Function getProxyProcessor has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  getProxyProcessor() {
                    return {
                      get(node, prop) {
                        if (prop === 'proxyOf') {
                          return node
                Severity: Minor
                Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

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

                  },{"./warning":35}],28:[function(require,module,exports){
                  'use strict'
                  
                  let Container = require('./container')
                  
                  
                  Severity: Minor
                  Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

                    Function checkPropClash has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) {
                        if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement")
                          { return }
                        if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))
                          { return }
                    Severity: Minor
                    Found in thirdparty/espree.js - About 1 hr to fix

                      Function parseMaybeAssign has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
                          if (this.isContextual("yield")) {
                            if (this.inGenerator) { return this.parseYield(forInit) }
                            // The tokenizer will assume an expression is allowed after
                            // `yield`, but this isn't that kind of yield
                      Severity: Minor
                      Found in thirdparty/espree.js - About 1 hr to fix

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

                                constructor(opts, code) {
                                    if (typeof opts !== "object" || opts === null) {
                                        opts = {};
                                    }
                                    if (typeof code !== "string" && !(code instanceof String)) {
                        Severity: Minor
                        Found in thirdparty/espree.js - About 1 hr to fix

                          Function Markdown has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          define(function Markdown(require, exports, module) {
                              "use strict";
                          
                              /**
                               * Get the modifier class based on the entry level.
                          Severity: Minor
                          Found in src/languages/Markdown.js - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language