adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

File RegisterLanguageClientInfo.js has 259 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/node/RegisterLanguageClientInfo.js - About 2 hrs to fix

    Function initTernModule has 55 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function initTernModule() {
                var moduleDeferred = $.Deferred();
                ternPromise = moduleDeferred.promise();
                
                function prepareTern() {  
    Severity: Major
    Found in src/JSUtils/ScopeManager.js - About 2 hrs to fix

      Function generateInstrumentedHTML has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function generateInstrumentedHTML(editor, remoteScript) {
              var doc = editor.document,
                  dom = scanDocument(doc),
                  orig = doc.getText(),
                  gen = "",
      Severity: Major
      Found in src/LiveDevelopment/MultiBrowserImpl/language/HTMLInstrumentation.js - About 2 hrs to fix

        Function _mouseDrag has 55 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _mouseDrag: function(event) {
        
                //Compute the helpers position
                this.position = this._generatePosition(event);
                this.positionAbs = this._convertPositionTo("absolute");

          Function data has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              data: function( elem, name, data, pvt /* Internal Use Only */ ) {
                  if ( !jQuery.acceptData( elem ) ) {
                      return;
                  }
          
          

            Function performRename has 55 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                ProjectModel.prototype.performRename = function () {
                    var renameInfo = this._selections.rename;
                    if (!renameInfo) {
                        return;
                    }
            Severity: Major
            Found in src/project/ProjectModel.js - About 2 hrs to fix

              Function _addToScopeOrder has 55 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      _addToScopeOrder: function (id, scope, promise, addBefore) {
                          var shadowScopeOrder = this._defaults._shadowScopeOrder,
                              shadowEntry,
                              index,
                              isPending = false,
              Severity: Major
              Found in src/preferences/PreferencesBase.js - About 2 hrs to fix

                Function _doOpen has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function _doOpen(fullPath, silent, paneId, options) {
                        var result = new $.Deferred();
                
                        // workaround for https://github.com/adobe/brackets/issues/6001
                        // TODO should be removed once bug is closed.
                Severity: Major
                Found in src/document/DocumentCommandHandlers.js - About 2 hrs to fix

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

                              it("should jump to the actual function definition, and not the exports line", function () {
                                  var start = { line: 159, ch: 22 };
                  
                                  testEditor.setCursorPos(start);
                                  runs(function () {
                  Severity: Major
                  Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 2 hrs to fix
                  src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1085..1092

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

                  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

                          for (i = 0; iCol < column; i++) {
                              if (line[i] === '\t') {
                                  if (tabSize === null) {
                                      tabSize = Editor.getTabSize();
                                  }
                  Severity: Major
                  Found in src/editor/Editor.js and 1 other location - About 2 hrs to fix
                  src/editor/Editor.js on lines 1162..1173

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

                  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 jump to the definition in new module file", function () {
                                  var start = { line: 40, ch: 22 };
                  
                                  testEditor.setCursorPos(start);
                                  runs(function () {
                  Severity: Major
                  Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 2 hrs to fix
                  src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1130..1137

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

                  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

                          for (i = 0; i < line.length; i++) {
                              if (line[i] === '\t') {
                                  if (tabSize === null) {
                                      tabSize = Editor.getTabSize();
                                  }
                  Severity: Major
                  Found in src/editor/Editor.js and 1 other location - About 2 hrs to fix
                  src/editor/Editor.js on lines 1190..1201

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

                  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 main.js has 258 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/extensions/default/PhpTooling/main.js - About 2 hrs to fix

                    Function _getLineCommentPrefixEdit has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function _getLineCommentPrefixEdit(editor, prefixes, blockPrefix, blockSuffix, lineSel) {
                            var doc         = editor.document,
                                sel         = lineSel.selectionForEdit,
                                trackedSels = lineSel.selectionsToTrack,
                                lineExp     = _createLineExpressions(prefixes, blockPrefix, blockSuffix),
                    Severity: Major
                    Found in src/editor/EditorCommandHandlers.js - About 2 hrs to fix

                      Function getScopeData has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function getScopeData(fileInfo, offset) {
                          // Create a new tern Server
                          // Existing tern server resolves all the required modules which might take time
                          // We only need to analyze single file for getting the scope
                          ternOptions.plugins = {};
                      Severity: Major
                      Found in src/JSUtils/node/TernNodeDomain.js - About 2 hrs to fix

                        Function _setupEventHandlers has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            ExtensionManagerView.prototype._setupEventHandlers = function () {
                                var self = this;
                        
                                // Listen for model data and filter changes.
                                this.model
                        Severity: Major
                        Found in src/extensibility/ExtensionManagerView.js - About 2 hrs to fix

                          Function _textReplace has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              DOMEditHandler.prototype._textReplace = function (targetElement, edit) {
                                  function prevIgnoringHighlights(node) {
                                      do {
                                          node = node.previousSibling;
                                      } while (node && node.className === HIGHLIGHT_CLASSNAME);
                          Severity: Major
                          Found in src/LiveDevelopment/Agents/RemoteFunctions.js - About 2 hrs to fix

                            Function removeData has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                removeData: function( elem, name, pvt /* Internal Use Only */ ) {
                                    if ( !jQuery.acceptData( elem ) ) {
                                        return;
                                    }
                            
                            

                              Function write has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  File.prototype.write = function (data, options, callback) {
                                      if (typeof options === "function") {
                                          callback = options;
                                          options = {};
                                      } else {
                              Severity: Major
                              Found in src/filesystem/File.js - About 2 hrs to fix

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

                                                FileUtils.writeText(file, _prefsString, true)
                                                    .done(function () {
                                                        recomputeDefaultPrefs = false;
                                                        _openPrefFilesInSplitView(prefsPath, defaultPrefsPath, deferredPromise);
                                                    }).fail(function (error) {
                                Severity: Major
                                Found in src/extensions/default/DebugCommands/main.js and 1 other location - About 2 hrs to fix
                                src/extensions/default/DebugCommands/main.js on lines 681..689

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

                                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