adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

Function push has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    push: function( result, actual, expected, message ) {
        if ( !config.current ) {
            throw new Error( "assertion outside test context, was " + sourceFromStacktrace() );
        }

    Function each has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        each: function( object, callback, args ) {
            var name, i = 0,
                length = object.length,
                isObj = length === undefined || jQuery.isFunction( object );
    
    

      Function closest has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          closest: function( selectors, context ) {
              var ret = [], i, l, cur = this[0];
      
              // Array (deprecated as of jQuery 1.7)
              if ( jQuery.isArray( selectors ) ) {

        Function set has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                set: function (id, value, options, doNotSave) {
                    options = options || {};
                    var context = this._getContext(options.context),
        
                        // The case where the "default" scope was chosen specifically is special.
        Severity: Minor
        Found in src/preferences/PreferencesBase.js - About 1 hr to fix

          Function _parseAtRule has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function _parseAtRule(level) {
          
                      // reset these fields to ignore comments preceding @rules
                      ruleStartLine = -1;
                      ruleStartChar = -1;
          Severity: Minor
          Found in src/language/CSSUtils.js - About 1 hr to fix

            Function mapFactory has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function mapFactory(iterable, mapper, context) {
                var mappedSequence = makeSequence(iterable);
                mappedSequence.size = iterable.size;
                mappedSequence.has = function(key ) {return iterable.has(key)};
                mappedSequence.get = function(key, notSetValue)  {
            Severity: Minor
            Found in src/thirdparty/immutable.js - About 1 hr to fix

              Function openSearchBar has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function openSearchBar(editor, replace) {
                      var cm = editor._codeMirror,
                          state = getSearchState(cm);
              
                      // Use the selection start as the searchStartPos. This way if you
              Severity: Minor
              Found in src/search/FindReplace.js - About 1 hr to fix

                Function show has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    show: function() {
                      /***** [changed for Brackets: moved some variables to updatePosition()] *****/
                      var $tip
                        , that = this;
                      /***** [/changed for Brackets] *****/
                Severity: Minor
                Found in src/widgets/bootstrap-twipsy-mod.js - About 1 hr to fix

                  Function _filterCallback has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      QuickNavigateDialog.prototype._filterCallback = function (query) {
                          // Re-evaluate which plugin is active each time query string changes
                          currentPlugin = null;
                  
                          // "Go to line" mode is special-cased
                  Severity: Minor
                  Found in src/search/QuickOpen.js - About 1 hr to fix

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

                                it("should match bezier curve function with no optional whitespace", function () {
                                    match = TimingFunctionUtils.timingFunctionMatch("cubic-bezier(.1,.2,.3,.4)", false);
                                    expectArraysToBeEqual(match, ["cubic-bezier(.1,.2,.3,.4)", ".1", ".2", ".3", ".4"]);
                                    expect(match.originalString).toBeFalsy();
                                });
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 105..109
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 110..114
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 115..119
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 120..124

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

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

                                            resp.process.stdout.on('data', function (data) {
                                                if (global.LanguageClientInfo.preferences.showServerLogsInConsole) {
                                                    console.info('[Server logs @ stdout] "%s"', String(data));
                                                }
                                            });
                    Severity: Major
                    Found in src/languageTools/LanguageClient/ServerUtils.js and 5 other locations - About 1 hr to fix
                    src/languageTools/LanguageClient/ServerUtils.js on lines 111..115
                    src/languageTools/LanguageClient/ServerUtils.js on lines 117..121
                    src/languageTools/LanguageClient/ServerUtils.js on lines 133..137
                    src/languageTools/LanguageClient/ServerUtils.js on lines 150..154
                    src/languageTools/LanguageClient/ServerUtils.js on lines 191..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 61.

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

                                it("should match bezier curve function with leading zeros", function () {
                                    match = TimingFunctionUtils.timingFunctionMatch("cubic-bezier(0.1, 0.2, 0.3, 0.4)", false);
                                    expectArraysToBeEqual(match, ["cubic-bezier(0.1, 0.2, 0.3, 0.4)", "0.1", "0.2", "0.3", "0.4"]);
                                    expect(match.originalString).toBeFalsy();
                                });
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 105..109
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 110..114
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 115..119
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 125..129

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

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

                                it("should NOT list variables, function names and parameter names in other files", function () {
                                    testEditor.setCursorPos({ line: 6, ch: 0 });
                                    var hintObj = expectHints(JSCodeHints.jsHintProvider);
                                    hintsAbsent(hintObj, ["E1", "E2"]);
                                });
                    Severity: Major
                    Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
                    src/extensions/default/JavaScriptCodeHints/unittests.js on lines 503..507
                    src/extensions/default/JavaScriptCodeHints/unittests.js on lines 521..525
                    src/extensions/default/JavaScriptCodeHints/unittests.js on lines 539..543
                    src/extensions/default/JavaScriptCodeHints/unittests.js on lines 581..585

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

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

                                        } else if (c === "s" || c === "S") {
                                            this._state = BEFORE_SPECIAL;
                                            this._startSection();
                                        } else if (!isLegalInTagName(c)) {
                                            this._emitSpecialToken("error");
                    Severity: Major
                    Found in src/language/HTMLTokenizer.js and 4 other locations - About 1 hr to fix
                    src/language/HTMLTokenizer.js on lines 242..255
                    src/language/HTMLTokenizer.js on lines 297..306
                    src/language/HTMLTokenizer.js on lines 325..334
                    src/language/HTMLTokenizer.js on lines 339..348

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

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

                                            resp.process.stderr.on('data', function (data) {
                                                if (global.LanguageClientInfo.preferences.showServerLogsInConsole) {
                                                    console.error('[Server logs @ stderr] "%s"', String(data));
                                                }
                                            });
                    Severity: Major
                    Found in src/languageTools/LanguageClient/ServerUtils.js and 5 other locations - About 1 hr to fix
                    src/languageTools/LanguageClient/ServerUtils.js on lines 111..115
                    src/languageTools/LanguageClient/ServerUtils.js on lines 117..121
                    src/languageTools/LanguageClient/ServerUtils.js on lines 133..137
                    src/languageTools/LanguageClient/ServerUtils.js on lines 156..160
                    src/languageTools/LanguageClient/ServerUtils.js on lines 191..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 61.

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

                                it("should match bezier curve function in full line of shorthand css", function () {
                                    match = TimingFunctionUtils.timingFunctionMatch("    transition: top 100ms cubic-bezier(.37, .28, .83, .94) 0;", false);
                                    expectArraysToBeEqual(match, ["cubic-bezier(.37, .28, .83, .94)", ".37", ".28", ".83", ".94"]);
                                    expect(match.originalString).toBeFalsy();
                                });
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 105..109
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 110..114
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 120..124
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 125..129

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

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

                                            resp.process.stdout.on('data', function (data) {
                                                if (global.LanguageClientInfo.preferences.showServerLogsInConsole) {
                                                    console.info('[Server logs @ stdout] "%s"', String(data));
                                                }
                                            });
                    Severity: Major
                    Found in src/languageTools/LanguageClient/ServerUtils.js and 5 other locations - About 1 hr to fix
                    src/languageTools/LanguageClient/ServerUtils.js on lines 111..115
                    src/languageTools/LanguageClient/ServerUtils.js on lines 133..137
                    src/languageTools/LanguageClient/ServerUtils.js on lines 150..154
                    src/languageTools/LanguageClient/ServerUtils.js on lines 156..160
                    src/languageTools/LanguageClient/ServerUtils.js on lines 191..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 61.

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

                                            resp.process.stderr.on('data', function (data) {
                                                if (global.LanguageClientInfo.preferences.showServerLogsInConsole) {
                                                    console.error('[Server logs @ stderr] "%s"', String(data));
                                                }
                                            });
                    Severity: Major
                    Found in src/languageTools/LanguageClient/ServerUtils.js and 5 other locations - About 1 hr to fix
                    src/languageTools/LanguageClient/ServerUtils.js on lines 111..115
                    src/languageTools/LanguageClient/ServerUtils.js on lines 117..121
                    src/languageTools/LanguageClient/ServerUtils.js on lines 150..154
                    src/languageTools/LanguageClient/ServerUtils.js on lines 156..160
                    src/languageTools/LanguageClient/ServerUtils.js on lines 191..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 61.

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

                                it("should match bezier curve function with negative value", function () {
                                    match = TimingFunctionUtils.timingFunctionMatch("cubic-bezier(0, -.2, 1, 1.2)", false);
                                    expectArraysToBeEqual(match, ["cubic-bezier(0, -.2, 1, 1.2)", "0", "-.2", "1", "1.2"]);
                                    expect(match.originalString).toBeFalsy();
                                });
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 110..114
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 115..119
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 120..124
                    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 125..129

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

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

                                xit("should list explicitly defined globals from JSLint annotations", function () {
                                    testEditor.setCursorPos({ line: 6, ch: 0 });
                                    var hintObj = expectHints(JSCodeHints.jsHintProvider);
                                    hintsPresent(hintObj, ["brackets", "$"]);
                                });
                    Severity: Major
                    Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
                    src/extensions/default/JavaScriptCodeHints/unittests.js on lines 521..525
                    src/extensions/default/JavaScriptCodeHints/unittests.js on lines 539..543
                    src/extensions/default/JavaScriptCodeHints/unittests.js on lines 545..549
                    src/extensions/default/JavaScriptCodeHints/unittests.js on lines 581..585

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

                    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