adobe/brackets

View on GitHub

Showing 1,485 of 3,294 total issues

Function val has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    val: function( value ) {
        var hooks, ret, isFunction,
            elem = this[0];

        if ( !arguments.length ) {

    Function on has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
            var origFn, type;
    
            // Types can be a map of types/handlers
            if ( typeof types === "object" ) {

      Function _openPrefFilesInSplitView has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Function open has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            DropdownEventHandler.prototype.open = function () {
                var self = this;
        
                /**
                 * Convert keydown events into hint list navigation actions.
        Severity: Minor
        Found in src/utils/DropdownEventHandler.js - About 1 hr to fix

          Function processLine has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function processLine(line) {
                  if (line === "") {
                      return;
                  }
          
          
          Severity: Minor
          Found in src/filesystem/impls/appshell/node/CSharpWatcher.js - About 1 hr to fix

            Function getDirNamesForDuplicateFiles has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function getDirNamesForDuplicateFiles(files) {
                    // Must have at least two files in list for this to make sense
                    if (files.length <= 1) {
                        return [];
                    }
            Severity: Minor
            Found in src/utils/ViewUtils.js - About 1 hr to fix

              Function extend has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              jQuery.extend = jQuery.fn.extend = function() {
                  var options, name, src, copy, copyIsArray, clone,
                      target = arguments[0] || {},
                      i = 1,
                      length = arguments.length,
              Severity: Minor
              Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

                Function on has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
                        var origFn, type;
                
                        // Types can be a map of types/handlers
                        if ( typeof types === "object" ) {
                Severity: Minor
                Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

                  Function hash has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function hash(o) {
                      if (o === false || o === null || o === undefined) {
                        return 0;
                      }
                      if (typeof o.valueOf === 'function') {
                  Severity: Minor
                  Found in src/thirdparty/immutable.js - About 1 hr to fix

                    Function updateOrderedMap has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function updateOrderedMap(omap, k, v) {
                        var map = omap._map;
                        var list = omap._list;
                        var i = map.get(k);
                        var has = i !== undefined;
                    Severity: Minor
                    Found in src/thirdparty/immutable.js - About 1 hr to fix

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

                          stop: function( type, clearQueue, gotoEnd ) {
                              var stopQueue = function( hooks ) {
                                  var stop = hooks.stop;
                                  delete hooks.stop;
                                  stop( gotoEnd );
                      Severity: Minor
                      Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

                        Function val has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            val: function( value ) {
                                var hooks, ret, isFunction,
                                    elem = this[0];
                        
                                if ( !arguments.length ) {
                        Severity: Minor
                        Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

                          Function show has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            , show: function () {
                                var $tip
                                  , pos
                                  , actualWidth
                                  , placement
                          Severity: Minor
                          Found in src/widgets/bootstrap-tooltip.js - About 1 hr to fix

                            Function syncDocToFoldsCache has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function syncDocToFoldsCache(cm, from, lineAdded) {
                                "use strict";
                                var minFoldSize = prefs.getSetting("minFoldSize") || 2;
                                var opts = cm.state.foldGutter.options || {};
                                var rf = opts.rangeFinder || CodeMirror.fold.auto;
                            Severity: Minor
                            Found in src/extensions/default/CodeFolding/unittest-files/test.js - About 1 hr 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 installFromURL has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function installFromURL(url) {
                                    var STATE_DOWNLOADING = 1,
                                        STATE_INSTALLING = 2,
                                        STATE_SUCCEEDED = 3,
                                        STATE_FAILED = 4;
                            Severity: Minor
                            Found in src/extensibility/Package.js - About 1 hr to fix

                              Function _getSelectorName has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function _getSelectorName(editor, pos) {
                                      var tagInfo = HTMLUtils.getTagInfo(editor, pos),
                                          selectorName = "",
                                          reason;
                              
                              
                              Severity: Minor
                              Found in src/editor/CSSInlineEditor.js - About 1 hr to fix

                                Function related has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function related() {
                                
                                        var rel = {
                                            scripts: {},
                                            stylesheets: {}

                                  Function setJumpSelection has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                              function setJumpSelection(start, end, isFunction) {
                                  
                                                  /**
                                                   * helper function to decide if the tokens on the RHS of an assignment
                                                   * look like an identifier, or member expr.
                                  Severity: Minor
                                  Found in src/extensions/default/JavaScriptCodeHints/main.js - About 1 hr to fix

                                    Function _getValidBezierParams has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function _getValidBezierParams(match) {
                                            var param,
                                                // take ease-in-out as default value in case there are no params yet (or they are invalid)
                                                def = [ ".42", "0", ".58", "1" ],
                                                oldIndex = match.index, // we need to store the old match.index to re-set the index afterwards

                                      Function bridge has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      $.widget.bridge = function( name, object ) {
                                          var fullName = object.prototype.widgetFullName;
                                          $.fn[ name ] = function( options ) {
                                              var isMethodCall = typeof options === "string",
                                                  args = slice.call( arguments, 1 ),
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language