adobe/brackets

View on GitHub

Showing 1,485 of 3,294 total issues

Function _createTagInfo has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function _createTagInfo(token, tokenType, offset, exclusionList, tagName, attrName, shouldReplace) {
Severity: Major
Found in src/language/XMLUtils.js - About 50 mins to fix

    Function access has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
    Severity: Major
    Found in src/thirdparty/jquery-2.1.3.js - About 50 mins to fix

      Function update has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
      Severity: Major
      Found in src/thirdparty/immutable.js - About 50 mins to fix

        Function update has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
        Severity: Major
        Found in src/thirdparty/immutable.js - About 50 mins to fix

          Function makeList has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            function makeList(origin, capacity, level, root, tail, ownerID, hash) {
          Severity: Major
          Found in src/thirdparty/immutable.js - About 50 mins to fix

            Function update has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
            Severity: Major
            Found in src/thirdparty/immutable.js - About 50 mins to fix

              Function update has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
              Severity: Major
              Found in src/thirdparty/immutable.js - About 50 mins to fix

                Function update has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
                Severity: Major
                Found in src/thirdparty/immutable.js - About 50 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                              if (sel.end.line === totalLines - 1) {
                                                  nextText += "\n";
                                              }
                  Severity: Major
                  Found in src/editor/EditorCommandHandlers.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if (text.indexOf(",") >= (offset - lastEnd)) {
                                                // comma is after the offset so the current arg is the
                                                // previous arg node.
                                                i--;
                                            } else if (i === 0 && text.indexOf("(") !== -1) {
                    Severity: Major
                    Found in src/JSUtils/Session.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          } else if (i + 1 === n) {
                                              // look for a comma after the node.end. This will tell us we
                                              // are on the next argument, even there is no text, and therefore no node,
                                              // for the next argument.
                                              text = fragment.substring(node.end, offset);
                      Severity: Major
                      Found in src/JSUtils/Session.js - About 45 mins to fix

                        Function _cmdInstall has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        function _cmdInstall(packagePath, destinationDirectory, options, callback, pCallback, _doUpdate) {
                        Severity: Minor
                        Found in src/extensibility/node/ExtensionManagerDomain.js - About 45 mins to fix

                          Function _isPrevTokenABlockComment has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              function _isPrevTokenABlockComment(ctx, prefix, suffix, prefixExp, suffixExp, lineExp) {
                          Severity: Minor
                          Found in src/editor/EditorCommandHandlers.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                        } else if (token.type === "attribname") {
                                            attributeName = token.contents.toLowerCase();
                                            // Set the value to the empty string in case this is an empty attribute. If it's not,
                                            // it will get overwritten by the attribvalue later.
                                            this.currentTag.attributes[attributeName] = "";
                            Severity: Major
                            Found in src/LiveDevelopment/MultiBrowserImpl/language/HTMLSimpleDOM.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  if (token.type === "selfclosingtag" && stack.length && stack[stack.length - 1] === this.currentTag) {
                                                      // This must have been a self-closing tag that we didn't identify as a void element
                                                      // (e.g. an SVG tag). Pop it off the stack as if we had encountered its close tag.
                                                      closeTag(token.end, token.endPos);
                                                  } else {
                              Severity: Major
                              Found in src/LiveDevelopment/MultiBrowserImpl/language/HTMLSimpleDOM.js - About 45 mins to fix

                                Function ConsoleAgent has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                Open

                                define(function ConsoleAgent(require, exports, module) {
                                    "use strict";
                                
                                    var Inspector = require("LiveDevelopment/Inspector/Inspector");
                                
                                
                                Severity: Minor
                                Found in src/LiveDevelopment/Agents/ConsoleAgent.js - About 45 mins 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

                                Avoid deeply nested control flow statements.
                                Open

                                                if (!voidElements.hasOwnProperty(closeTagName)) {
                                                    // Find the topmost item on the stack that matches. If we can't find one, assume
                                                    // this is just a dangling closing tag and ignore it.
                                                    var i;
                                                    for (i = stack.length - 1; i >= 0; i--) {
                                Severity: Major
                                Found in src/LiveDevelopment/MultiBrowserImpl/language/HTMLSimpleDOM.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          if (param.value < 0) {
                                                              match[i] = "0";
                                                          } else if (param.value > 1) {
                                                              match[i] = "1";
                                                          }
                                  Severity: Major
                                  Found in src/extensions/default/InlineTimingFunctionEditor/TimingFunctionUtils.js - About 45 mins to fix

                                    Function isOver has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        isOver: function( y, x, top, left, height, width ) {

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                  if (currentDeferred && currentDeferred.state() === "pending") {
                                                                      currentDeferred.reject();
                                                                  }
                                      Severity: Major
                                      Found in src/extensions/default/UrlCodeHints/main.js - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language