adobe/brackets

View on GitHub

Showing 1,485 of 3,294 total issues

Function getRange has 92 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function getRange(cm, start) {
        var currentLine = start.line,
            text = cm.getLine(currentLine) || "",
            i = 0,
            tagStack = [],
Severity: Major
Found in src/extensions/default/CodeFolding/foldhelpers/handlebarsFold.js - About 3 hrs to fix

    File CodeHintManager.js has 317 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/editor/CodeHintManager.js - About 3 hrs to fix

      File ProtocolAdapter.js has 317 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/LanguageClient/ProtocolAdapter.js - About 3 hrs to fix

        Function handleValidationStatus has 90 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function handleValidationStatus(statusObj) {
                enableCheckForUpdateEntry(true);
                UpdateStatus.cleanUpdateStatus();
        
                if (statusObj.valid) {
        Severity: Major
        Found in src/extensions/default/AutoUpdate/main.js - About 3 hrs to fix

          Function nud has 90 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  nud: function () {
                      var v = this.value,
                          s = scope[v],
                          f;
          
          

            Function _doSearch has 90 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function _doSearch(queryInfo, candidateFilesPromise, filter) {
                    searchModel.filter = filter;
            
                    var queryResult = searchModel.setQueryInfo(queryInfo);
                    if (!queryResult) {
            Severity: Major
            Found in src/search/FindInFiles.js - About 3 hrs to fix

              Function HighlightAgent has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

              define(function HighlightAgent(require, exports, module) {
                  "use strict";
              
                  var DOMAgent        = require("LiveDevelopment/Agents/DOMAgent"),
                      EventDispatcher = require("utils/EventDispatcher"),
              Severity: Minor
              Found in src/LiveDevelopment/Agents/HighlightAgent.js - About 3 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 _getUrlList has 89 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  UrlCodeHints.prototype._getUrlList = function (query) {
                      var directory,
                          doc,
                          docDir,
                          queryDir = "",
              Severity: Major
              Found in src/extensions/default/UrlCodeHints/main.js - About 3 hrs to fix

                Function getHints has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    UrlCodeHints.prototype.getHints = function (key) {
                        var mode = this.editor.getModeForSelection(),
                            cursor = this.editor.getCursorPos(),
                            filter = "",
                            hints = [],
                Severity: Major
                Found in src/extensions/default/UrlCodeHints/main.js - About 3 hrs to fix

                  Function callbacks has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          callbacks = (function () {
                  
                              // for string, boolean, number and null
                              function useStrictEquality( b, a ) {
                                  if ( b instanceof a.constructor || a instanceof b.constructor ) {

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

                                    send: function( headers, complete ) {
                    
                                        // Get a new xhr
                                        var xhr = s.xhr(),
                                            handle,

                      File strings.js has 312 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /*
                       * Copyright (c) 2013 - 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/nls/sk/strings.js - About 3 hrs to fix

                        Function jsonValue has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function jsonValue() {
                        
                                function jsonObject() {
                                    var o = {}, t = nexttoken;
                                    advance('{');

                          Function handleFileClose has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function handleFileClose(commandData) {
                                  var file,
                                      promptOnly,
                                      _forceClose,
                                      _spawnedRequest,
                          Severity: Major
                          Found in src/document/DocumentCommandHandlers.js - About 3 hrs to fix

                            Function HighlightAgent has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            define(function HighlightAgent(require, exports, module) {
                                "use strict";
                            
                                var DOMAgent        = require("LiveDevelopment/Agents/DOMAgent"),
                                    EventDispatcher = require("utils/EventDispatcher"),
                            Severity: Major
                            Found in src/LiveDevelopment/Agents/HighlightAgent.js - About 3 hrs to fix

                              Function convertToArrowFunction has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function convertToArrowFunction() {
                                      var editor = EditorManager.getActiveEditor();
                                      if (!editor) {
                                          return;
                                      }
                              Severity: Major
                              Found in src/extensions/default/JavaScriptRefactoring/WrapSelection.js - About 3 hrs to fix

                                Function run has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function run() {
                                        if (!_enabled) {
                                            _hasErrors = false;
                                            _currentPromise = null;
                                            Resizer.hide($problemsPanel);
                                Severity: Major
                                Found in src/language/CodeInspection.js - About 3 hrs to fix

                                  File HTMLUtils.js has 310 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/language/HTMLUtils.js - About 3 hrs to fix

                                    Function _openInterstitialPage has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function _openInterstitialPage() {
                                            var browserStarted  = false,
                                                retryCount      = 0;
                                    
                                            // Open the live browser if the connection fails, retry 3 times
                                    Severity: Major
                                    Found in src/LiveDevelopment/LiveDevelopment.js - About 3 hrs to fix

                                      Function showUpdateBar has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          function showUpdateBar(msgObj) {
                                              var jsonToMustache = generateJsonForMustache(msgObj),
                                                  $updateBarElement = $(Mustache.render(UpdateBarHtml, jsonToMustache));
                                      
                                              cleanUpdateBar(); //Remove an already existing update bar, if any
                                      Severity: Major
                                      Found in src/extensions/default/AutoUpdate/UpdateInfoBar.js - About 3 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language