adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

Function _showImageTip has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    ImageView.prototype._showImageTip = function (e) {
        // Don't show image tip if this._scale is close to zero.
        // since we won't have enough room to show tip anyway.
        if (Math.floor(this._scale) === 0) {
            return;
Severity: Minor
Found in src/editor/ImageViewer.js - About 1 hr to fix

    Function addMenu has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function addMenu(name, id, position, relativeID) {
            name = _.escape(name);
            var $menubar = $("#titlebar .nav"),
                menu;
    
    
    Severity: Minor
    Found in src/command/Menus.js - About 1 hr to fix

      Function _open has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function _open(doc) {
              if (doc && _liveDocument && doc === _liveDocument.doc) {
                  if (_server) {
                      // Launch the URL in the browser. If it's the first one to connect back to us,
                      // our status will transition to ACTIVE once it does so.
      Severity: Minor
      Found in src/LiveDevelopment/LiveDevMultiBrowser.js - About 1 hr to fix

        Function plot has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                plot: function (settings) {
                    var xy = this.bezier.coordinates,
                        ctx = this.canvas.getContext("2d"),
                        setting;
        
        

          Function initiateUpdateProcess has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function initiateUpdateProcess(formattedInstallerPath, formattedLogFilePath, installStatusFilePath) {
          
                  // Get additional update parameters on Mac : installDir, appName, and updateDir
                  function getAdditionalParams() {
                      var retval = {};
          Severity: Minor
          Found in src/extensions/default/AutoUpdate/main.js - About 1 hr to fix

            Function _tabKeydown has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _tabKeydown: function( event ) {
                    var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
                        selectedIndex = this.tabs.index( focusedTab ),
                        goingForward = true;
            
            

              Function _handleDirectoryChange has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  FileSystem.prototype._handleDirectoryChange = function (directory, callback) {
                      var oldContents = directory._contents;
              
                      directory._clearCachedData();
                      directory.getContents(function (err, contents) {
              Severity: Minor
              Found in src/filesystem/FileSystem.js - About 1 hr to fix

                Function stop has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    stop: function( type, clearQueue, gotoEnd ) {
                        if ( typeof type !== "string" ) {
                            gotoEnd = clearQueue;
                            clearQueue = type;
                            type = undefined;

                  Function _loadDefaultPrefs has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function _loadDefaultPrefs(prefsPath, deferredPromise) {
                  
                          var defaultPrefsPath = defaultPreferencesFullPath,
                              file             = FileSystem.getFileForPath(defaultPrefsPath);
                  
                  
                  Severity: Minor
                  Found in src/extensions/default/DebugCommands/main.js - About 1 hr to fix

                    Function fileClosed has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function fileClosed(file) {
                            if (!file) {
                                return;
                            }
                            var language = LanguageManager.getLanguageForPath(file._path),
                    Severity: Minor
                    Found in src/utils/HealthLogger.js - About 1 hr to fix

                      Function stringMatch has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function stringMatch(str, query, options, special) {
                              var result;
                      
                              options = options || {};
                      
                      
                      Severity: Minor
                      Found in src/utils/StringMatch.js - About 1 hr to fix

                        Function skipWhileFactory has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          function skipWhileFactory(iterable, predicate, context, useKeys) {
                            var skipSequence = makeSequence(iterable);
                            skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
                              if (reverse) {
                                return this.cacheResult().__iterate(fn, reverse);
                        Severity: Minor
                        Found in src/thirdparty/immutable.js - About 1 hr to fix

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

                                      it("should NOT hint in case there is a space between < and tag name", function () {
                                          // After space in < rect
                                          testDocument.replaceRange(" ", {line: 4, ch: 5});
                                          testEditor.setCursorPos({line: 4, ch: 11});
                                          expectNoHints(SVGCodeHints.hintProvider);
                          Severity: Major
                          Found in src/extensions/default/SVGCodeHints/unittests.js and 4 other locations - About 1 hr to fix
                          src/extensions/default/SVGCodeHints/unittests.js on lines 191..196
                          src/extensions/default/SVGCodeHints/unittests.js on lines 198..203
                          src/extensions/default/SVGCodeHints/unittests.js on lines 298..303
                          src/extensions/default/SVGCodeHints/unittests.js on lines 435..440

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

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

                              BracketsToNodeInterface.prototype._messageHandler = function (evt, params) {
                                  var methodName = params.method,
                                      self = this;
                          
                                  function _getErrorString(err) {
                          Severity: Minor
                          Found in src/languageTools/BracketsToNodeInterface.js - About 1 hr to fix

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

                                        it("should NOT hint in an invalid tag", function () {
                                            // After fill=" in < rect
                                            testDocument.replaceRange(" ", {line: 4, ch: 5});
                                            testEditor.setCursorPos({line: 4, ch: 42});
                                            expectNoHints(SVGCodeHints.hintProvider);
                            Severity: Major
                            Found in src/extensions/default/SVGCodeHints/unittests.js and 4 other locations - About 1 hr to fix
                            src/extensions/default/SVGCodeHints/unittests.js on lines 191..196
                            src/extensions/default/SVGCodeHints/unittests.js on lines 198..203
                            src/extensions/default/SVGCodeHints/unittests.js on lines 298..303
                            src/extensions/default/SVGCodeHints/unittests.js on lines 305..310

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

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

                            module.exports = function (grunt) {
                                var common          = require("./lib/common")(grunt),
                                    child_process   = require("child_process"),
                                    q               = require("q"),
                                    qexec           = q.denodeify(child_process.exec),
                            Severity: Minor
                            Found in tasks/test.js - About 1 hr to fix

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

                                          it("should NOT hint after first character in an invalid tag", function () {
                                              // After < r in first < rect
                                              testDocument.replaceRange(" ", {line: 4, ch: 5});
                                              testEditor.setCursorPos({line: 4, ch: 7});
                                              expectNoHints(SVGCodeHints.hintProvider);
                              Severity: Major
                              Found in src/extensions/default/SVGCodeHints/unittests.js and 4 other locations - About 1 hr to fix
                              src/extensions/default/SVGCodeHints/unittests.js on lines 198..203
                              src/extensions/default/SVGCodeHints/unittests.js on lines 298..303
                              src/extensions/default/SVGCodeHints/unittests.js on lines 305..310
                              src/extensions/default/SVGCodeHints/unittests.js on lines 435..440

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

                              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 hint if we have whitespace between attribute and =", function () {
                                              // Before = in <rect width =
                                              testDocument.replaceRange("  ", {line: 4, ch: 15});
                                              testEditor.setCursorPos({line: 4, ch: 16});
                                              expectNoHints(SVGCodeHints.hintProvider);
                              Severity: Major
                              Found in src/extensions/default/SVGCodeHints/unittests.js and 4 other locations - About 1 hr to fix
                              src/extensions/default/SVGCodeHints/unittests.js on lines 191..196
                              src/extensions/default/SVGCodeHints/unittests.js on lines 198..203
                              src/extensions/default/SVGCodeHints/unittests.js on lines 305..310
                              src/extensions/default/SVGCodeHints/unittests.js on lines 435..440

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

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

                                  function updateResultSet(editor) {
                                      var cm = editor._codeMirror,
                                          state = getSearchState(cm);
                              
                                      function indicateHasMatches(numResults) {
                              Severity: Minor
                              Found in src/search/FindReplace.js - About 1 hr to fix

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

                                            it("should NOT hint in the middle of invalid tag", function () {
                                                // After < rec in < rect
                                                testDocument.replaceRange(" ", {line: 4, ch: 5});
                                                testEditor.setCursorPos({line: 4, ch: 9});
                                                expectNoHints(SVGCodeHints.hintProvider);
                                Severity: Major
                                Found in src/extensions/default/SVGCodeHints/unittests.js and 4 other locations - About 1 hr to fix
                                src/extensions/default/SVGCodeHints/unittests.js on lines 191..196
                                src/extensions/default/SVGCodeHints/unittests.js on lines 298..303
                                src/extensions/default/SVGCodeHints/unittests.js on lines 305..310
                                src/extensions/default/SVGCodeHints/unittests.js on lines 435..440

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

                                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