Hirse/brackets-outline-list

View on GitHub

Showing 905 of 905 total issues

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

      ch === 0x64 /* d */ ||
      ch === 0x44 /* D */ ||
      ch === 0x73 /* s */ ||
      ch === 0x53 /* S */ ||
      ch === 0x77 /* w */ ||
Severity: Major
Found in thirdparty/espree.js and 1 other location - About 1 hr to fix
thirdparty/espree.js on lines 5746..5751

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

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

      ch === 0x21 /* ! */ ||
      ch === 0x23 /* # */ ||
      ch === 0x25 /* % */ ||
      ch === 0x26 /* & */ ||
      ch === 0x2C /* , */ ||
Severity: Major
Found in thirdparty/espree.js and 1 other location - About 1 hr to fix
thirdparty/espree.js on lines 5379..5384

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

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

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

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

Severity: Minor
Found in src/languages/XML.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 getOutlineList has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function getOutlineList(text) {
        var lines = text.replace(/\)((?:[^\S\n]*\n)+)\s*\{/g, "){$1").split("\n");
        var regexMethod = /\s*def\s+(\w*[.\w*]+\??)\s*(\([\w,\s,$,_="]*\))?/g;
        var regexMethodClass = /\s*(class\s+<<\s+self)\s*/g;
        var regexMethodPrivate = /\s*private\s*/g;
Severity: Minor
Found in src/languages/Ruby.js - About 1 hr to fix

    Function _createListEntry has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function _createListEntry(namespace, name, id, classes, indent) {
            var $elements = [];
            if (indent) {
                var $indentation = $(document.createElement("span"));
                $indentation.addClass("outline-entry-indent");
    Severity: Minor
    Found in src/languages/XML.js - About 1 hr to fix

      Function 22 has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{"./css-syntax-error":12,"./stringifier":30,"./stringify":31,"./symbols":32}],22:[function(require,module,exports){
      (function (process){(function (){
      'use strict'
      
      let Container = require('./container')
      Severity: Minor
      Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

        Function jsx_readToken has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            jsx_readToken() {
              let out = '', chunkStart = this.pos;
              for (;;) {
                if (this.pos >= this.input.length)
                  this.raise(this.start, 'Unterminated JSX contents');
        Severity: Minor
        Found in thirdparty/espree.js - About 1 hr to fix

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

              for (let id in this.indexes) {
                index = this.indexes[id]
                if (existIndex <= index) {
                  this.indexes[id] = index + nodes.length
                }
          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 2380..2385

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

          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

              for (let id in this.indexes) {
                index = this.indexes[id]
                if (existIndex < index) {
                  this.indexes[id] = index + nodes.length
                }
          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 2400..2405

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

          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.ended) {
                      (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(".write() after done!"));
                      return;
                  }
          Severity: Major
          Found in thirdparty/htmlparser2.js and 1 other location - About 1 hr to fix
          thirdparty/htmlparser2.js on lines 3553..3556

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

          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.ended) {
                      (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(".end() after done!"));
                      return;
                  }
          Severity: Major
          Found in thirdparty/htmlparser2.js and 1 other location - About 1 hr to fix
          thirdparty/htmlparser2.js on lines 3536..3539

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

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

          AST.prototype.prepare = function(kind, parser) {
            var start = null;
            if (this.withPositions || this.withSource) {
              start = this.position(parser);
            }
          Severity: Minor
          Found in thirdparty/php-parser.js - About 1 hr to fix

            Function fromJSON has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function fromJSON(json, inputs) {
              if (Array.isArray(json)) return json.map(n => fromJSON(n))
            
              let { inputs: ownInputs, ...defaults } = json
              if (ownInputs) {
            Severity: Minor
            Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

              Function getAtomFeed has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function getAtomFeed(feedRoot) {
                  var _a;
                  var childs = feedRoot.children;
                  var feed = {
                      type: "atom",
              Severity: Minor
              Found in thirdparty/htmlparser2.js - About 1 hr to fix

                Function getJsxTokens has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function getJsxTokens(acorn) {
                  acorn = acorn.Parser.acorn || acorn;
                  let acornJsx = acornJsxMap.get(acorn);
                  if (!acornJsx) {
                    const tt = acorn.tokTypes;
                Severity: Minor
                Found in thirdparty/espree.js - About 1 hr to fix

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

                        (revLookup[b64.charCodeAt(i)] << 10) |
                        (revLookup[b64.charCodeAt(i + 1)] << 4) |
                        (revLookup[b64.charCodeAt(i + 2)] >> 2)
                  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 97..99

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

                  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

                        (revLookup[b64.charCodeAt(i)] << 18) |
                        (revLookup[b64.charCodeAt(i + 1)] << 12) |
                        (revLookup[b64.charCodeAt(i + 2)] << 6) |
                  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 115..117

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

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

                    matchINITIAL: function() {
                      while(this.offset < this.size) {
                        var ch = this.input();
                        if (ch == '<') {
                          ch = this.ahead(1);
                  Severity: Minor
                  Found in thirdparty/php-parser.js - About 1 hr to fix

                    Function read_top_statement has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      ,read_top_statement: function() {
                        switch(this.token) {
                          case this.tok.T_FUNCTION:
                            return this.read_function(false, false);
                          // optional flags
                    Severity: Minor
                    Found in thirdparty/php-parser.js - About 1 hr to fix

                      Function read_interface_body has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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