adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

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

            var testAllHints = function () {
                    testEditor.setCursorPos({ line: 0, ch: 11 });    // after :
                    var hintList = expectHints(CSSPseudoSelectorCodeHints.pseudoSelectorHints);
                    console.log(JSON.stringify(hintList));
                    verifyFirstEntry(hintList, "active");  // filtered on "empty string"
Severity: Major
Found in src/extensions/default/CSSPseudoSelectorHints/unittests.js and 1 other location - About 3 hrs to fix
src/extensions/default/CSSPseudoSelectorHints/unittests.js on lines 189..195

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

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

    function getRange(cm, start) {
        var currentLine = start.line,
            text = cm.getLine(currentLine) || "",
            i = 0,
            tagStack = [],
Severity: Major
Found in src/extensions/default/CodeFolding/foldhelpers/handlebarsFold.js - About 3 hrs to fix

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

                it("should insert a value of type Boolean", function () {
                    testDocument.replaceRange("\"closeOthers.above\":,", {line: 25, ch: 4});
                    testEditor.setCursorPos({line: 25, ch: 24});
                    selectHint(PrefsCodeHints.hintProvider, "true");
                    expectTokenAt({line: 25, ch: 28}, "true", "atom");
    Severity: Major
    Found in src/extensions/default/PrefsCodeHints/unittests.js and 2 other locations - About 3 hrs to fix
    src/extensions/default/PrefsCodeHints/unittests.js on lines 567..573
    src/extensions/default/PrefsCodeHints/unittests.js on lines 574..580

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

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

                        runs(function () {
                            checkPercentageNear(colorEditor.$hueSelector[0].style.bottom, 25);
                            checkPercentageNear(colorEditor.$opacitySelector[0].style.bottom, 50);
                            checkPercentageNear(colorEditor.$selectionBase[0].style.left, 74);
                            checkPercentageNear(colorEditor.$selectionBase[0].style.bottom, 47);
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 3 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 466..471

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

    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

                it("should replace current token when editing", function () {
                    testDocument.replaceRange("\"closeOthers.above\": tru", {line: 25, ch: 4});
                    testEditor.setCursorPos({line: 25, ch: 28});
                    selectHint(PrefsCodeHints.hintProvider, "true");
                    expectTokenAt({line: 25, ch: 28}, "true", "atom");
    Severity: Major
    Found in src/extensions/default/PrefsCodeHints/unittests.js and 2 other locations - About 3 hrs to fix
    src/extensions/default/PrefsCodeHints/unittests.js on lines 560..566
    src/extensions/default/PrefsCodeHints/unittests.js on lines 574..580

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

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

                        runs(function () {
                            checkPercentageNear(colorEditor.$hueSelector[0].style.bottom, 25);
                            checkPercentageNear(colorEditor.$opacitySelector[0].style.bottom, 50);
                            checkPercentageNear(colorEditor.$selectionBase[0].style.left, 74);
                            checkPercentageNear(colorEditor.$selectionBase[0].style.bottom, 47);
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 3 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 440..445

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

    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

                it("should insert a value of type String", function () {
                    testDocument.replaceRange(",\n        \"pavement\":", {line: 7, ch: 32});
                    testEditor.setCursorPos({line: 8, ch: 19});
                    selectHint(PrefsCodeHints.hintProvider, "python");
                    expectTokenAt({line: 8, ch: 27}, "\"python\"", "string");
    Severity: Major
    Found in src/extensions/default/PrefsCodeHints/unittests.js and 2 other locations - About 3 hrs to fix
    src/extensions/default/PrefsCodeHints/unittests.js on lines 560..566
    src/extensions/default/PrefsCodeHints/unittests.js on lines 567..573

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

    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

                it("should hint for background-image: url() in CSS", function () {
                    runs(function () {
                        setupTests(testCssPath);
                    });
    
    
    Severity: Major
    Found in src/extensions/default/UrlCodeHints/unittests.js and 1 other location - About 3 hrs to fix
    src/extensions/default/UrlCodeHints/unittests.js on lines 311..325

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

    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

                it("should hint for background-image: url() in SCSS", function () {
                    runs(function () {
                        setupTests(testScssPath);
                    });
    
    
    Severity: Major
    Found in src/extensions/default/UrlCodeHints/unittests.js and 1 other location - About 3 hrs to fix
    src/extensions/default/UrlCodeHints/unittests.js on lines 295..309

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

    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

    File CodeHintManager.js has 317 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Copyright (c) 2012 - present Adobe Systems Incorporated. All rights reserved.
     *
     * Permission is hereby granted, free of charge, to any person obtaining a
     * copy of this software and associated documentation files (the "Software"),
    Severity: Minor
    Found in src/editor/CodeHintManager.js - About 3 hrs to fix

      File ProtocolAdapter.js has 317 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*
       * Copyright (c) 2019 - present Adobe. All rights reserved.
       *
       * Permission is hereby granted, free of charge, to any person obtaining a
       * copy of this software and associated documentation files (the "Software"),
      Severity: Minor
      Found in src/languageTools/LanguageClient/ProtocolAdapter.js - About 3 hrs to fix

        Function handleValidationStatus has 90 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function handleValidationStatus(statusObj) {
                enableCheckForUpdateEntry(true);
                UpdateStatus.cleanUpdateStatus();
        
                if (statusObj.valid) {
        Severity: Major
        Found in src/extensions/default/AutoUpdate/main.js - About 3 hrs to fix

          Function nud has 90 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  nud: function () {
                      var v = this.value,
                          s = scope[v],
                          f;
          
          

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

                var voidElements = {
                    area: true,
                    base: true,
                    basefont: true,
                    br: true,
            src/language/HTMLSimpleDOM.js on lines 126..147

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

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

                    if ( data == null && fn == null ) {
                        // ( types, fn )
                        fn = selector;
                        data = selector = undefined;
                    } else if ( fn == null ) {
            src/thirdparty/jquery-2.1.3.js on lines 4823..4838

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

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

                    if ( data == null && fn == null ) {
                        // ( types, fn )
                        fn = selector;
                        data = selector = undefined;
                    } else if ( fn == null ) {
            Severity: Major
            Found in src/thirdparty/jquery-2.1.3.js and 1 other location - About 3 hrs to fix
            src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 3773..3788

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

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

                function _doSearch(queryInfo, candidateFilesPromise, filter) {
                    searchModel.filter = filter;
            
                    var queryResult = searchModel.setQueryInfo(queryInfo);
                    if (!queryResult) {
            Severity: Major
            Found in src/search/FindInFiles.js - About 3 hrs to fix

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

                  var voidElements = {
                      area: true,
                      base: true,
                      basefont: true,
                      br: true,
              Severity: Major
              Found in src/language/HTMLSimpleDOM.js and 1 other location - About 3 hrs to fix
              src/LiveDevelopment/MultiBrowserImpl/language/HTMLSimpleDOM.js on lines 91..112

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

              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

                          xit("should read properties from exported module", function () {
                              var start        = { line: 96, ch: 0 },
                                  testPos          = { line: 96, ch: 9};
              
                              testDoc.replaceRange("hondaCar.", start);
              Severity: Major
              Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 3 hrs to fix
              src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1501..1511

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

              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 ( factor.from.y !== factor.to.y ) {
                              child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
                              child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
                          }
              src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.effects.scale.js on lines 227..230

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

              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