Hirse/brackets-outline-list

View on GitHub

Showing 905 of 905 total issues

Function stateInSpecialTag has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    Tokenizer.prototype.stateInSpecialTag = function (c) {
        if (this.sequenceIndex === this.currentSequence.length) {
            if (c === CharCodes.Gt || isWhitespace(c)) {
                var endOfText = this.index - this.currentSequence.length;
                if (this.sectionStart < endOfText) {
Severity: Minor
Found in thirdparty/htmlparser2.js - About 1 hr to fix

    Function showSourceCode has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      showSourceCode(color) {
        if (!this.source) return ''
    
        let css = this.source
        if (color == null) color = pico.isColorSupported
    Severity: Minor
    Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

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

      },{"./document":14,"./lazy-result":17,"./no-work-result":20,"./root":28,"_process":36}],27:[function(require,module,exports){
      'use strict'
      
      let Warning = require('./warning')
      
      
      Severity: Minor
      Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

        Function parseSwitchStatement has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          pp$8.parseSwitchStatement = function(node) {
            this.next();
            node.discriminant = this.parseParenExpression();
            node.cases = [];
            this.expect(types$1.braceL);
        Severity: Minor
        Found in thirdparty/espree.js - About 1 hr to fix

          Function declareName has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            pp$3.declareName = function(name, bindingType, pos) {
              var redeclared = false;
              if (bindingType === BIND_LEXICAL) {
                var scope = this.currentScope();
                redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1;
          Severity: Minor
          Found in thirdparty/espree.js - About 1 hr to fix

            Function Jade has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

            define(function Jade(require, exports, module) {
                "use strict";
            
                var Editor = brackets.getModule("editor/Editor").Editor;
            
            
            Severity: Minor
            Found in src/languages/Jade.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 Python has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

            define(function Python(require, exports, module) {
                "use strict";
            
                /**
                 * Get the visibility class based on the function name and type.
            Severity: Minor
            Found in src/languages/Python.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 3 locations. Consider refactoring.
            Open

                  if (result.what.kind === 'bin') {
                    buffer = result.what;
                    result.what = result.what.left;
                    buffer.left = this.resolvePrecedence(result);
                    result = buffer;
            Severity: Major
            Found in thirdparty/php-parser.js and 2 other locations - About 1 hr to fix
            thirdparty/php-parser.js on lines 239..244
            thirdparty/php-parser.js on lines 256..261

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

            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 (result.what.kind === 'retif') {
                    buffer = result.what;
                    result.what = result.what.test;
                    buffer.test = this.resolvePrecedence(result);
                    result = buffer;
            Severity: Major
            Found in thirdparty/php-parser.js and 2 other locations - About 1 hr to fix
            thirdparty/php-parser.js on lines 239..244
            thirdparty/php-parser.js on lines 251..261

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

            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 (lLevel && rLevel && rLevel <= lLevel) {
                      buffer = result.right;
                      result.right = result.right.test;
                      buffer.test = this.resolvePrecedence(result);
                      result = buffer;
            Severity: Major
            Found in thirdparty/php-parser.js and 2 other locations - About 1 hr to fix
            thirdparty/php-parser.js on lines 251..261
            thirdparty/php-parser.js on lines 256..261

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

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

            },{}],103:[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 raw has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                raw(node, prop, tokens, customProperty) {
                  let token, type
                  let length = tokens.length
                  let value = ''
                  let clean = true
              Severity: Minor
              Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

                Function regexp_eatRegExpUnicodeEscapeSequence has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  pp$1.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {
                    if ( forceU === void 0 ) forceU = false;
                
                    var start = state.pos;
                    var switchU = forceU || state.switchU;
                Severity: Minor
                Found in thirdparty/espree.js - About 1 hr to fix

                  Function read_simple_variable has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    ,read_simple_variable: function(byref) {
                      var result = this.node('variable');
                      if (this.expect([this.tok.T_VARIABLE, '$']) && this.token === this.tok.T_VARIABLE) {
                        // plain variable name
                        var name = this.text().substring(1);
                  Severity: Minor
                  Found in thirdparty/php-parser.js - About 1 hr to fix

                    Function onclosetag has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        Parser.prototype.onclosetag = function (start, endIndex) {
                            var _a, _b, _c, _d, _e, _f, _g, _h;
                            this.endIndex = endIndex;
                            var name = this.getSlice(start, endIndex);
                            if (this.lowerCaseTagNames) {
                    Severity: Minor
                    Found in thirdparty/htmlparser2.js - About 1 hr to fix

                      Function sync has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        sync() {
                          if (this.error) throw this.error
                          if (this.processed) return this.result
                          this.processed = true
                      
                      
                      Severity: Minor
                      Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

                        Function 8 has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        },{"domhandler":4}],8:[function(require,module,exports){
                        "use strict";
                        var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
                            if (k2 === undefined) k2 = k;
                            var desc = Object.getOwnPropertyDescriptor(m, k);
                        Severity: Minor
                        Found in thirdparty/htmlparser2.js - About 1 hr to fix

                          Function jsx_readEntity has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              jsx_readEntity() {
                                let str = '', count = 0, entity;
                                let ch = this.input[this.pos];
                                if (ch !== '&')
                                  this.raise(this.pos, 'Entity must start with an ampersand');
                          Severity: Minor
                          Found in thirdparty/espree.js - About 1 hr to fix

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

                              prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 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 1380..1380

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

                            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

                            Severity
                            Category
                            Status
                            Source
                            Language