Hirse/brackets-outline-list

View on GitHub

Showing 905 of 905 total issues

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

    function showDelayDialog() {
        var Dialog = Dialogs.showModalDialog(
            brackets.DIALOG_ID_SAVE_CLOSE,
            Strings.AUTOHIDE_DELAY_MODAL_TITLE,
            Mustache.render(delayDialogTemplate, {
Severity: Minor
Found in src/Autohide.js - About 1 hr to fix

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

    function from (value, encodingOrOffset, length) {
      if (typeof value === 'string') {
        return fromString(value, encodingOrOffset)
      }
    
    
    Severity: Minor
    Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

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

        constructor(css, opts = {}) {
          if (
            css === null ||
            typeof css === 'undefined' ||
            (typeof css === 'object' && !css.toString)
      Severity: Minor
      Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

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

        function compareDocumentPosition(nodeA, nodeB) {
            var aParents = [];
            var bParents = [];
            if (nodeA === nodeB) {
                return 0;
        Severity: Minor
        Found in thirdparty/htmlparser2.js - About 1 hr to fix

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

            raw(node, own, detect) {
              let value
              if (!detect) detect = own
          
              // Already had
          Severity: Minor
          Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

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

              pp.skipSpace = function() {
                loop: while (this.pos < this.input.length) {
                  var ch = this.input.charCodeAt(this.pos);
                  switch (ch) {
                  case 32: case 160: // ' '
            Severity: Minor
            Found in thirdparty/espree.js - About 1 hr to fix

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

                pp$8.parseExport = function(node, exports) {
                  this.next();
                  // export * from '...'
                  if (this.eat(types$1.star)) {
                    return this.parseExportAllDeclaration(node, exports)
              Severity: Minor
              Found in thirdparty/espree.js - About 1 hr to fix

                Function read_variable has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  read_variable: function(read_only, encapsed, byref) {
                    var result;
                
                    // check the byref flag
                    if (!byref && this.token === '&') {
                Severity: Minor
                Found in thirdparty/php-parser.js - About 1 hr to fix

                  Function renderTag has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function renderTag(elem, opts) {
                      var _a;
                      // Handle SVG / MathML in HTML
                      if (opts.xmlMode === "foreign") {
                          /* Fix up mixed-case element names */
                  Severity: Minor
                  Found in thirdparty/htmlparser2.js - About 1 hr to fix

                    Function fromOffset has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      fromOffset(offset) {
                        let lastLine, lineToIndex
                        if (!this[fromOffsetCache]) {
                          let lines = this.css.split('\n')
                          lineToIndex = new Array(lines.length)
                    Severity: Minor
                    Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

                      Function split has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        split(string, separators, last) {
                          let array = []
                          let current = ''
                          let split = false
                      
                      
                      Severity: Minor
                      Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

                        Function parseProperty has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
                            var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
                            if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) {
                              if (isPattern) {
                                prop.argument = this.parseIdent(false);
                        Severity: Minor
                        Found in thirdparty/espree.js - About 1 hr to fix

                          Function CoffeeScript has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                          define(function CoffeeScript(require, exports, module) {
                              "use strict";
                          
                              /** @const {string} Placeholder for unnamed functions. */
                              var UNNAMED_PLACEHOLDER = "→";
                          Severity: Minor
                          Found in src/languages/CoffeeScript.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 toByteArray has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function toByteArray (b64) {
                            var tmp
                            var lens = getLens(b64)
                            var validLen = lens[0]
                            var placeHoldersLen = lens[1]
                          Severity: Minor
                          Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

                            Function prepareVisitors has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              prepareVisitors() {
                                this.listeners = {}
                                let add = (plugin, type, cb) => {
                                  if (!this.listeners[type]) this.listeners[type] = []
                                  this.listeners[type].push([plugin, cb])
                            Severity: Minor
                            Found in thirdparty/postcss-safe-parser.js - About 1 hr to fix

                              Function encodeHTMLTrieRe has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function encodeHTMLTrieRe(regExp, str) {
                                  var ret = "";
                                  var lastIdx = 0;
                                  var match;
                                  while ((match = regExp.exec(str)) !== null) {
                              Severity: Minor
                              Found in thirdparty/htmlparser2.js - About 1 hr to fix

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

                                var Interface = Declaration.extends(function Interface(name, ext, body, location) {
                                  Declaration.apply(this, [KIND, name, location]);
                                  this.extends = ext;
                                  this.body = body;
                                });
                                Severity: Major
                                Found in thirdparty/php-parser.js and 1 other location - About 1 hr to fix
                                thirdparty/php-parser.js on lines 960..964

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

                                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 (this.token === ':') {
                                      shortForm = true;
                                      body = this.read_short_form(this.tok.T_ENDWHILE);
                                    } else {
                                      body = this.read_statement();
                                Severity: Major
                                Found in thirdparty/php-parser.js and 2 other locations - About 1 hr to fix
                                thirdparty/php-parser.js on lines 6565..6570
                                thirdparty/php-parser.js on lines 6601..6606

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

                                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

                                var Declare = Block.extends(function Declare(what, body, mode, location) {
                                  Block.apply(this, [KIND, body, location]);
                                  this.what = what;
                                  this.mode = mode;
                                });
                                Severity: Major
                                Found in thirdparty/php-parser.js and 1 other location - About 1 hr to fix
                                thirdparty/php-parser.js on lines 1615..1619

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

                                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 (this.token === ':') {
                                      shortForm = true;
                                      body = this.read_short_form(this.tok.T_ENDFOR);
                                    } else  {
                                      body = this.read_statement();
                                Severity: Major
                                Found in thirdparty/php-parser.js and 2 other locations - About 1 hr to fix
                                thirdparty/php-parser.js on lines 6499..6504
                                thirdparty/php-parser.js on lines 6601..6606

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

                                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