adobe/brackets

View on GitHub

Showing 1,485 of 3,294 total issues

Consider simplifying this complex logical expression.
Open

            if (!left.identifier && left.id !== '.' && left.id !== '[' &&
                    left.id !== '(' && left.id !== '&&' && left.id !== '||' &&
                    left.id !== '?') {
                warning("Bad invocation.", left);
            }

    Consider simplifying this complex logical expression.
    Open

            if(       this.options.tolerance == "pointer"
                || this.options.forcePointerForContainers
                || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])
            ) {
                return isOverElement;

      Consider simplifying this complex logical expression.
      Open

                  if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
                      ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
                      !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
      
                      value = value.replace( rxhtmlTag, "<$1></$2>" );

        Consider simplifying this complex logical expression.
        Open

                        if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
        
                            event.data = handleObj.data;
                            event.handleObj = handleObj;
        
        

          Consider simplifying this complex logical expression.
          Open

                  if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
                      return;
                  }

            Consider simplifying this complex logical expression.
            Open

            if ( jQuery.expr && jQuery.expr.filters ) {
                jQuery.expr.filters.hidden = function( elem ) {
                    var width = elem.offsetWidth,
                        height = elem.offsetHeight;
            
            

              Function extract has 8 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  function extract(ast, text, scopes, srcScope, destScope, start, end, isExpression) {
              Severity: Major
              Found in src/extensions/default/JavaScriptRefactoring/ExtractToFunction.js - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                        if (isHDTracking && !isEventDataAlreadySent && eventName && eventCategory) {
                            eventParams =  {
                                eventName: eventName,
                                eventCategory: eventCategory,
                                eventSubCategory: eventSubCategory || "",
                Severity: Major
                Found in src/utils/HealthLogger.js - About 1 hr to fix

                  Function createTagInfo has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      function createTagInfo(tokenType, offset, tagName, attrName, attrValue, valueAssigned, quoteChar, hasEndQuote) {
                  Severity: Major
                  Found in src/language/HTMLUtils.js - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                            if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                    support.getById && context.nodeType === 9 && documentIsHTML &&
                                    Expr.relative[ tokens[1].type ] ) {
                    
                                context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
                    Severity: Major
                    Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

                      Function updateNode has 8 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
                      Severity: Major
                      Found in src/thirdparty/immutable.js - About 1 hr to fix

                        Function _constructParamsAndRelay has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function _constructParamsAndRelay(relay, type, params) {
                            var _params = null,
                                handler = null;
                        
                            //Check for param object format. We won't change anything if the object is preformatted.
                        Severity: Minor
                        Found in src/languageTools/LanguageClient/ProtocolAdapter.js - About 55 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

                        Function exports has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                        module.exports = function (grunt) {
                            var common      = {},
                                path        = require("path"),
                                _platform;
                        
                        
                        Severity: Minor
                        Found in tasks/lib/common.js - About 55 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

                        Function fileCrawler has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function fileCrawler() {
                            if (!files || (files && files.length === 0)) {
                                setTimeout(fileCrawler, 1000);
                                return;
                            }
                        Severity: Minor
                        Found in src/search/node/FindInFilesDomain.js - About 55 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

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

                            function _getBlockCommentPrefixSuffixEdit(editor, prefix, suffix, linePrefixes, sel, selectionsToTrack, command) {
                        Severity: Major
                        Found in src/editor/EditorCommandHandlers.js - About 50 mins to fix

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

                              function errorAt(m, l, ch, a, b, c, d) {

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

                                function warningAt(m, l, ch, a, b, c, d) {

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

                                  access: function( elems, fn, key, value, chainable, emptyGet, pass ) {

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

                                    function _lastSegmentSearch(query, str, originalQuery, originalStr, specials, startingSpecial, lastSegmentStart) {
                                Severity: Major
                                Found in src/utils/StringMatch.js - About 50 mins to fix

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

                                      function createInfo(context, offset, name, index, values, isNewItem, range) {
                                  Severity: Major
                                  Found in src/language/CSSUtils.js - About 50 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language