adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

Avoid deeply nested control flow statements.
Open

                    if ( elem && elem.parentNode ) {
                        // Handle the case where IE, Opera, and Webkit return items
                        // by name instead of ID
                        if ( elem.id === m ) {
                            results.push( elem );
Severity: Major
Found in src/thirdparty/jquery-2.1.3.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                if ( !(unmatched[i] || setMatched[i]) ) {
                                    setMatched[i] = pop.call( results );
                                }
    Severity: Major
    Found in src/thirdparty/jquery-2.1.3.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if ( !selector ) {
                              push.apply( results, seed );
                              return results;
                          }
      Severity: Major
      Found in src/thirdparty/jquery-2.1.3.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if ( (event.result = ret) === false ) {
                                    event.preventDefault();
                                    event.stopPropagation();
                                }
        Severity: Major
        Found in src/thirdparty/jquery-2.1.3.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if ( rscriptType.test( node.type || "" ) &&
                                      !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
          
                                      if ( node.src ) {
                                          // Optional AJAX dependency, but won't run scripts if not present
          Severity: Major
          Found in src/thirdparty/jquery-2.1.3.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if ( copyIsArray ) {
                                    copyIsArray = false;
                                    clone = src && jQuery.isArray(src) ? src : [];
            
                                } else {
            Severity: Major
            Found in src/thirdparty/jquery-2.1.3.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                              } else if ( copy !== undefined ) {
                                  target[ name ] = copy;
                              }
              Severity: Major
              Found in src/thirdparty/jquery-2.1.3.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if ( hasScripts ) {
                                            // Support: QtWebKit
                                            // jQuery.merge because push.apply(_, arraylike) throws
                                            jQuery.merge( scripts, getAll( node, "script" ) );
                                        }
                Severity: Major
                Found in src/thirdparty/jquery-2.1.3.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if ( conv && s[ "throws" ] ) {
                                          response = conv( response );
                                      } else {
                                          try {
                                              response = conv( response );
                  Severity: Major
                  Found in src/thirdparty/jquery-2.1.3.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        for ( conv2 in converters ) {
                    
                                            // If conv2 outputs current
                                            tmp = conv2.split( " " );
                                            if ( tmp[ 1 ] === current ) {
                    Severity: Major
                    Found in src/thirdparty/jquery-2.1.3.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              if ( matches[ sel ] ) {
                                                  matches.push( handleObj );
                                              }
                      Severity: Major
                      Found in src/thirdparty/jquery-2.1.3.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                        if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
                                                            // Cache the index of each encountered element
                                                            if ( useCache ) {
                                                                (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
                                                            }
                        Severity: Major
                        Found in src/thirdparty/jquery-2.1.3.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                    if (options.debug)
                                      console.error('globstar swallow a segment, and continue')
                          Severity: Major
                          Found in src/thirdparty/globmatch.js - About 45 mins to fix

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

                                        it("should NOT list prop-name hints right before curly bracket", function () {
                                            testEditor.setCursorPos({ line: 4, ch: 10 });    // inside .selector, before {
                                            expectNoHints(CSSCodeHints.cssPropHintProvider);
                                        });
                            Severity: Major
                            Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
                            src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
                            src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
                            src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
                            src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
                            src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
                            src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
                            src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
                            src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
                            src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
                            src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
                            src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
                            src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
                            src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
                            src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

                            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

                            Identical blocks of code found in 3 locations. Consider refactoring.
                            Open

                                    function setupTest(content, languageId) {
                                        var mock = SpecRunnerUtils.createMockEditor(content, languageId);
                                        testDocument = mock.doc;
                                        testEditor = mock.editor;
                                    }
                            Severity: Major
                            Found in src/extensions/default/CSSPseudoSelectorHints/unittests.js and 2 other locations - About 45 mins to fix
                            src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 48..52
                            src/extensions/default/CSSCodeHints/unittests.js on lines 78..82

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

                            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 addIndicator has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                function addIndicator(id, indicator, visible, style, tooltip, insertBefore) {
                            Severity: Minor
                            Found in src/widgets/StatusBar.js - About 45 mins to fix

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

                                          it("should list prop-name hints inside multi-line styletags with cursor in first line", function () {
                                              testEditor.setCursorPos({ line: 9, ch: 18 });   // inside style, after {
                                              expectHints(CSSCodeHints.cssPropHintProvider);
                                          });
                              Severity: Major
                              Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
                              src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
                              src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
                              src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
                              src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
                              src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
                              src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
                              src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
                              src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
                              src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
                              src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
                              src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
                              src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
                              src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
                              src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

                              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

                              Identical blocks of code found in 3 locations. Consider refactoring.
                              Open

                                      function setupTest(content, languageId) {
                                          var mock = SpecRunnerUtils.createMockEditor(content, languageId);
                                          testDocument = mock.doc;
                                          testEditor = mock.editor;
                                      }
                              Severity: Major
                              Found in src/extensions/default/CSSCodeHints/unittests.js and 2 other locations - About 45 mins to fix
                              src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 48..52
                              src/extensions/default/CSSPseudoSelectorHints/unittests.js on lines 54..58

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

                              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 15 locations. Consider refactoring.
                              Open

                                          it("should NOT list prop-name hints right before style value context", function () {
                                              testEditor.setCursorPos({ line: 4, ch: 11 });    // after =
                                              expectNoHints(CSSCodeHints.cssPropHintProvider);
                                          });
                              Severity: Major
                              Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
                              src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
                              src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
                              src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
                              src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
                              src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
                              src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
                              src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
                              src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
                              src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
                              src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
                              src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
                              src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
                              src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
                              src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

                              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 15 locations. Consider refactoring.
                              Open

                                          it("should list prop-name hints inside single-line styletags after semicolon", function () {
                                              testEditor.setCursorPos({ line: 1, ch: 37 });  // inside style, after ;
                                              expectHints(CSSCodeHints.cssPropHintProvider);
                                          });
                              Severity: Major
                              Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
                              src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
                              src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
                              src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
                              src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
                              src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
                              src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
                              src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
                              src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
                              src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
                              src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
                              src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
                              src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
                              src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
                              src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

                              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