adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

Function init has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function init(domainManager) {
    if (!domainManager.hasDomain("fileWatcher")) {
        domainManager.registerDomain("fileWatcher", {major: 0, minor: 1});
    }

Severity: Minor
Found in src/filesystem/impls/appshell/node/FileWatcherDomain.js - About 2 hrs to fix

    Function remove has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        remove: function( elem, types, handler, selector, mappedTypes ) {
    
            var j, origCount, tmp,
                events, t, handleObj,
                special, handlers, type, namespaces, origType,
    Severity: Minor
    Found in src/thirdparty/jquery-2.1.3.js - About 2 hrs to fix

      Function _getFunctionEndOffset has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function _getFunctionEndOffset(text, offsetStart) {
              var mode = CodeMirror.getMode({}, "javascript");
              var state = CodeMirror.startState(mode), stream, style, token;
              var curOffset = offsetStart, length = text.length, blockCount = 0, lineStart;
              var foundStartBrace = false;
      Severity: Minor
      Found in src/language/JSUtils.js - About 2 hrs to fix

        Consider simplifying this complex logical expression.
        Open

                        if ( ( mappedTypes || origType === handleObj.origType ) &&
                            ( !handler || handler.guid === handleObj.guid ) &&
                            ( !tmp || tmp.test( handleObj.namespace ) ) &&
                            ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
                            handlers.splice( j, 1 );
        Severity: Critical
        Found in src/thirdparty/jquery-2.1.3.js - About 2 hrs to fix

          Consider simplifying this complex logical expression.
          Open

              if (
                !isIterable(b) ||
                a.size !== undefined && b.size !== undefined && a.size !== b.size ||
                a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash ||
                isKeyed(a) !== isKeyed(b) ||
          Severity: Critical
          Found in src/thirdparty/immutable.js - About 2 hrs to fix

            Function _initTest has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function _initTest() {
                    // TODO: (issue #265) Make sure the "test" object is not included in final builds
                    // All modules that need to be tested from the context of the application
                    // must to be added to this object. The unit tests cannot just pull
                    // in the modules since they would run in context of the unit test window,
            Severity: Minor
            Found in src/brackets.js - About 2 hrs to fix

              Function _startServerAndGetTransports has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function _startServerAndGetTransports(communication, processArgs, isRuntime) {
                      return new Promise(function (resolve, reject) {
                          var serverProcess = null,
                              result = null,
                              protocolTransport = null,
              Severity: Minor
              Found in src/languageTools/LanguageClient/ServerUtils.js - About 2 hrs to fix

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

                    clone: function( dataAndEvents, deepDataAndEvents ) {
                        dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
                        deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
                
                        return this.map(function() {
                Severity: Major
                Found in src/thirdparty/jquery-2.1.3.js and 1 other location - About 2 hrs to fix
                src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 5918..5925

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

                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 show inner function type", function () {
                                var testPos = { line: 96, ch: 23 };
                
                                testEditor.setCursorPos(testPos);
                                runs(function () {
                Severity: Major
                Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
                src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1240..1246
                src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1337..1344

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

                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

                            match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
                                return new RegExp( "^" + escape( character ), "i" )
                                    .test( $( this ).children( "a" ).text() );
                            });
                src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.menu.js on lines 245..248

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

                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(!isAutoUpdateInitiated) {
                            isAutoUpdateInitiated = true;
                            updateJsonHandler.refresh()
                                .done(function() {
                                    setUpdateStateInJSON('downloadCompleted', false)
                Severity: Major
                Found in src/extensions/default/AutoUpdate/main.js and 1 other location - About 2 hrs to fix
                src/extensions/default/AutoUpdate/main.js on lines 959..969

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

                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 list parameter hint for a source array annotation", function () {
                                var testPos = { line: 200, ch: 20 };
                                testEditor.setCursorPos(testPos);
                                runs(function () {
                                    expectParameterHint([{name: "a", type: "Array.<String>"}], 0);
                Severity: Major
                Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
                src/extensions/default/JavaScriptCodeHints/unittests.js on lines 936..943
                src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1337..1344

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

                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

                                top: cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
                src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.sortable.js on lines 347..347

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

                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

                                match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
                                    return new RegExp( "^" + escape(character), "i" )
                                        .test( $( this ).children( "a" ).text() );
                                });
                src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.menu.js on lines 233..236

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

                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

                    clone: function( dataAndEvents, deepDataAndEvents ) {
                        dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
                        deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
                
                        return this.map( function () {
                src/thirdparty/jquery-2.1.3.js on lines 5285..5292

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

                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("function type hint in html file", function () {
                                var start = { line: 36, ch: 12 };
                
                                testEditor.setCursorPos(start);
                                runs(function () {
                Severity: Major
                Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
                src/extensions/default/JavaScriptCodeHints/unittests.js on lines 936..943
                src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1240..1246

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

                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(!isAutoUpdateInitiated) {
                                isAutoUpdateInitiated = true;
                                updateJsonHandler.refresh()
                                    .done(function() {
                                        setUpdateStateInJSON('downloadCompleted', true)
                Severity: Major
                Found in src/extensions/default/AutoUpdate/main.js and 1 other location - About 2 hrs to fix
                src/extensions/default/AutoUpdate/main.js on lines 681..691

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

                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

                    CodeHintList.prototype.isOpen = function () {
                        // We don't get a notification when the dropdown closes. The best
                        // we can do is keep an "opened" flag and check to see if we
                        // still have the "open" class applied.
                        if (this.opened && !this.$hintMenu.hasClass("open")) {
                Severity: Major
                Found in src/editor/CodeHintList.js and 1 other location - About 2 hrs to fix
                src/widgets/InlineMenu.js on lines 381..390

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

                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

                                            FileViewController.openFileAndAddToWorkingSet(userPrefFullPath, paneId)
                                                .done(function () {
                                                    Dialogs.showModalDialog(
                                                        DefaultDialogs.DIALOG_ID_ERROR,
                                                        Strings.ERROR_PREFS_CORRUPT_TITLE,
                Severity: Major
                Found in src/brackets.js and 1 other location - About 2 hrs to fix
                src/project/ProjectManager.js on lines 898..908

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

                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

                    Record.prototype.__iterate = function(fn, reverse) {var this$0 = this;
                      return KeyedIterable(this._defaultValues).map(function(_, k)  {return this$0.get(k)}).__iterate(fn, reverse);
                    };
                Severity: Major
                Found in src/thirdparty/immutable.js and 1 other location - About 2 hrs to fix
                src/thirdparty/immutable.js on lines 3718..3720

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

                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