adobe/brackets

View on GitHub

Showing 1,485 of 3,294 total issues

Function showDropdown has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    DropdownButton.prototype.showDropdown = function () {
        // Act like a plain old button if no items to show
        if (!this.items.length) {
            return;
        }
Severity: Minor
Found in src/widgets/DropdownButton.js - About 1 hr to fix

    Function _handleMouseEnterOrExitScaleSticker has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        ImageView.prototype._handleMouseEnterOrExitScaleSticker = function (offsetX, offsetY) {
            var imagePos       = this.$imagePreview.position(),
                scaleDivPos    = this.$imageScale.position(),
                imgWidth       = this.$imagePreview.width(),
                imgHeight      = this.$imagePreview.height(),
    Severity: Minor
    Found in src/editor/ImageViewer.js - About 1 hr to fix

      Function setInlineWidgetHeight has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          Editor.prototype.setInlineWidgetHeight = function (inlineWidget, height, ensureVisible) {
              var self = this,
                  node = inlineWidget.htmlContent,
                  oldHeight = (node && $(node).height()) || 0,
                  changed = (oldHeight !== height),
      Severity: Minor
      Found in src/editor/Editor.js - About 1 hr to fix

        Function shake has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        $.effects.effect.shake = function( o, done ) {
        
            var el = $( this ),
                props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
                mode = $.effects.setMode( el, o.mode || "effect" ),

          Function conststatement has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  var conststatement = stmt('const', function (prefix) {
                      var id, name, value;
          
                      this.first = [];
                      for (;;) {

            Function add has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    add: function( url, label, index ) {
                        if ( index === undefined ) {
                            index = this.anchors.length;
                        }
            
            

              Function varstatement has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var varstatement = stmt('var', function (prefix) {
                      // JavaScript does not have block scope. It only has function scope. So,
                      // declaring a variable in a block can have unexpected consequences.
                      var id, name, value;
              
              

                Function _makeResizable has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _makeResizable: function( handles ) {
                        handles = (handles === undefined ? this.options.resizable : handles);
                        var that = this,
                            options = this.options,
                            // .ui-resizable has position: relative defined in the stylesheet

                  Function directives has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function directives() {
                          var i, p, pn;
                  
                          for (;;) {
                              if (nexttoken.id === "(string)") {

                    Function load has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        load: function( index, event ) {
                            index = this._getIndex( index );
                            var that = this,
                                tab = this.tabs.eq( index ),
                                anchor = tab.find( ".ui-tabs-anchor" ),

                      Function scale has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      $.effects.effect.scale = function( o, done ) {
                      
                          // Create element
                          var el = $( this ),
                              options = $.extend( true, {}, o ),

                        Function loadMetadata has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function loadMetadata(folder) {
                                var packageJSONFile = FileSystem.getFileForPath(folder + "/package.json"),
                                    disabledFile = FileSystem.getFileForPath(folder + "/.disabled"),
                                    baseName = FileUtils.getBaseName(folder),
                                    result = new $.Deferred(),
                        Severity: Minor
                        Found in src/utils/ExtensionUtils.js - About 1 hr to fix

                          Function writeFile has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function writeFile(path, data, options, callback) {
                                  var encoding = options.encoding || "utf8",
                                      preserveBOM = options.preserveBOM;
                          
                                  function _finishWrite(created) {
                          Severity: Minor
                          Found in src/filesystem/impls/appshell/AppshellFileSystem.js - About 1 hr to fix

                            Function _updateFromPrefs has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function _updateFromPrefs(pref) {
                                    var newMapping = PreferencesManager.get(pref),
                                        newNames = Object.keys(newMapping),
                                        state = _prefState[pref],
                                        last = state.last,
                            Severity: Minor
                            Found in src/language/LanguageManager.js - About 1 hr to fix

                              Consider simplifying this complex logical expression.
                              Open

                                          if (isBlockComment) {
                                              // Save the initial position to start searching for the suffix from here
                                              initialPos = _.cloneDeep(ctx.pos);
                              
                                              // Find the position of the start of the prefix
                              Severity: Critical
                              Found in src/editor/EditorCommandHandlers.js - About 1 hr to fix

                                Consider simplifying this complex logical expression.
                                Open

                                        if ( ( ( $target[0].id != $.datepicker._mainDivId &&
                                                $target.parents('#' + $.datepicker._mainDivId).length == 0 &&
                                                !$target.hasClass($.datepicker.markerClassName) &&
                                                !$target.closest("." + $.datepicker._triggerClass).length &&
                                                $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||

                                  Consider simplifying this complex logical expression.
                                  Open

                                          if (this.floating && horizontalDirection) {
                                              return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf));
                                          } else {
                                              return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf));
                                          }

                                    Consider simplifying this complex logical expression.
                                    Open

                                            if(!(/^(document|window|parent)$/).test(o.containment)) {
                                                var ce = $(o.containment)[0];
                                                var co = $(o.containment).offset();
                                                var over = ($(ce).css("overflow") != 'hidden');
                                    
                                    

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

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

                                        Function initiateAutoUpdate has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            function initiateAutoUpdate(updateParams) {
                                                _updateParams = updateParams;
                                                downloadAttemptsRemaining = MAX_DOWNLOAD_ATTEMPTS;
                                        
                                                initializeState()
                                        Severity: Minor
                                        Found in src/extensions/default/AutoUpdate/main.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language