adobe/brackets

View on GitHub

Showing 1,485 of 3,294 total issues

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 _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 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 _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

                File bootstrap-tooltip.js has 256 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /* ===========================================================
                 * bootstrap-tooltip.js v2.3.1
                 * http://twitter.github.com/bootstrap/javascript.html#tooltips
                 * Inspired by the original jQuery.tipsy by Jason Frame
                 * ===========================================================
                Severity: Minor
                Found in src/widgets/bootstrap-tooltip.js - About 2 hrs to fix

                  Function handleTernGetFile has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          function handleTernGetFile(request) {
                  
                              function replyWith(name, txt) {
                                  _postMessageByPass({
                                      type: MessageIds.TERN_GET_FILE_MSG,
                  Severity: Major
                  Found in src/JSUtils/ScopeManager.js - About 2 hrs to fix

                    Function _installEditorListeners has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        Editor.prototype._installEditorListeners = function () {
                            var self = this;
                    
                            // Redispatch these CodeMirror key events as Editor events
                            function _onKeyEvent(instance, event) {
                    Severity: Major
                    Found in src/editor/Editor.js - About 2 hrs to fix

                      File foldgutter.js has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      // CodeMirror, copyright (c) by Marijn Haverbeke and others
                      // Distributed under an MIT license: http://codemirror.net/LICENSE
                      // Based on http://codemirror.net/addon/fold/foldgutter.js
                      // Modified by Patrick Oladimeji for Brackets
                      
                      
                      Severity: Minor
                      Found in src/extensions/default/CodeFolding/foldhelpers/foldgutter.js - About 2 hrs to fix

                        Function _generateMonthYearHeader has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
                                    secondary, monthNames, monthNamesShort) {
                                var changeMonth = this._get(inst, 'changeMonth');
                                var changeYear = this._get(inst, 'changeYear');
                                var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');

                          Function render has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  render: function () {
                                      var selectionBackground = fileSelectionBox({
                                          ref: "selectionBackground",
                                          selectionViewInfo: this.props.selectionViewInfo,
                                          className: "filetree-selection",
                          Severity: Major
                          Found in src/project/FileTreeView.js - About 2 hrs to fix

                            File Async.js has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

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

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

                                  data: function( key, value ) {
                                      var i, name, data,
                                          elem = this[ 0 ],
                                          attrs = elem && elem.attributes;
                              
                              
                              Severity: Major
                              Found in src/thirdparty/jquery-2.1.3.js - About 2 hrs to fix

                                Function send has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                            send: function( headers, complete ) {
                                                var i,
                                                    xhr = options.xhr(),
                                                    id = ++xhrId;
                                
                                
                                Severity: Major
                                Found in src/thirdparty/jquery-2.1.3.js - About 2 hrs to fix

                                  Function _requestTernServer has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function _requestTernServer(commandConfig) {
                                      var file, text, offset,
                                          request = commandConfig,
                                          type = request.type;
                                      if (config.debug) {
                                  Severity: Minor
                                  Found in src/JSUtils/node/TernNodeDomain.js - About 2 hrs to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function watchPath has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function watchPath(path, ignored, _watcherMap) {
                                  
                                      var ignoreMatcher = buildMatcher(ignored);
                                      var closing = false;
                                  
                                  
                                  Severity: Minor
                                  Found in src/filesystem/impls/appshell/node/CSharpWatcher.js - About 2 hrs to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function getSearchMatches has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function getSearchMatches(contents, queryExpr) {
                                      if (!contents) {
                                          return;
                                      }
                                      // Quick exit if not found or if we hit the limit
                                  Severity: Minor
                                  Found in src/search/node/FindInFilesDomain.js - About 2 hrs to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function updateFoldInfo has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function updateFoldInfo(cm, from, to) {
                                          var minFoldSize = prefs.getSetting("minFoldSize") || 2;
                                          var opts = cm.state.foldGutter.options;
                                          var fade = prefs.getSetting("hideUntilMouseover");
                                          var $gutter = $(cm.getGutterElement());
                                  Severity: Major
                                  Found in src/extensions/default/CodeFolding/foldhelpers/foldgutter.js - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language