adobe/brackets

View on GitHub

Showing 1,485 of 3,294 total issues

File HTMLInstrumentation.js has 405 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright (c) 2014 - 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/LiveDevelopment/MultiBrowserImpl/language/HTMLInstrumentation.js - About 5 hrs to fix

    Function main has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

    define(function main(require, exports, module) {
        "use strict";
    
        var DocumentManager     = require("document/DocumentManager"),
            Commands            = require("command/Commands"),
    Severity: Minor
    Found in src/LiveDevelopment/main.js - About 5 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 size has 138 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    $.effects.effect.size = function( o, done ) {
    
        // Create element
        var el = $( this ),
            props = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],

      Function _create has 138 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _create: function() {
              var i,
                  o = this.options,
                  existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
                  handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",

        Function _create has 137 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _create: function() {
                this.element.closest( "form" )
                    .unbind( "reset.button" )
                    .bind( "reset.button", formResetHandler );
        
        

          File HTMLInstrumentation.js has 395 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/language/HTMLInstrumentation.js - About 5 hrs to fix

            File unittests.js has 390 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /**
             * Codefolding unit test files
             * @author Patrick Oladimeji
             * @date 01/08/2015 18:34
             */
            Severity: Minor
            Found in src/extensions/default/CodeFolding/unittests.js - About 5 hrs to fix

              Function parseDate has 134 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  parseDate: function (format, value, settings) {
                      if (format == null || value == null)
                          throw 'Invalid arguments';
                      value = (typeof value == 'object' ? value.toString() : value + '');
                      if (value == '')

                File strings.js has 389 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/nls/el/strings.js - About 5 hrs to fix

                  File SearchResultsView.js has 388 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /*
                   * Copyright (c) 2014 - 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/search/SearchResultsView.js - About 5 hrs to fix

                    Function GotoAgent has 132 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    define(function GotoAgent(require, exports, module) {
                        "use strict";
                    
                        require("utils/Global");
                    
                    
                    Severity: Major
                    Found in src/LiveDevelopment/Agents/GotoAgent.js - About 5 hrs to fix

                      File Resizer.js has 382 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/Resizer.js - About 5 hrs to fix

                        Function Pane has 129 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function Pane(id, $container) {
                                this._initialize();
                        
                                // Setup the container and the element we're inserting
                                var self = this,
                        Severity: Major
                        Found in src/view/Pane.js - About 5 hrs to fix

                          File jquery.ui.widget.js has 381 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /*!
                           * jQuery UI Widget @VERSION
                           *
                           * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
                           * Dual licensed under the MIT or GPL Version 2 licenses.

                            Function _computeRangesAndScore has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function _computeRangesAndScore(matchList, str, lastSegmentStart) {
                                    var matchCounter;
                                    var ranges = [];
                                    var lastMatchIndex = -1;
                                    var lastSegmentScore = 0;
                            Severity: Major
                            Found in src/utils/StringMatch.js - About 5 hrs to fix

                              Function Callbacks has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              jQuery.Callbacks = function( options ) {
                              
                                  // Convert options from String-formatted to Object-formatted if needed
                                  // (we check in cache first)
                                  options = typeof options === "string" ?
                              Severity: Major
                              Found in src/thirdparty/jquery-2.1.3.js - About 5 hrs to fix

                                Function htmlToCSSProvider has 127 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function htmlToCSSProvider(hostEditor, pos) {
                                
                                        // Only provide a CSS editor when cursor is in HTML content
                                        if (hostEditor.getLanguageForSelection().getId() !== "html") {
                                            return null;
                                Severity: Major
                                Found in src/editor/CSSInlineEditor.js - About 5 hrs to fix

                                  Function _performChanges has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function _performChanges() {
                                          // If an extension was removed or updated, prompt the user to quit Brackets.
                                          var hasRemovedExtensions    = ExtensionManager.hasExtensionsToRemove(),
                                              hasUpdatedExtensions    = ExtensionManager.hasExtensionsToUpdate(),
                                              hasDisabledExtensions   = ExtensionManager.hasExtensionsToDisable();
                                  Severity: Major
                                  Found in src/extensibility/ExtensionManagerDialog.js - About 5 hrs to fix

                                    Function Editor has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function Editor(document, makeMasterEditor, container, range, options) {
                                            var self = this;
                                    
                                            var isReadOnly = (options && options.isReadOnly) || !document.editable;
                                    
                                    
                                    Severity: Major
                                    Found in src/editor/Editor.js - About 5 hrs to fix

                                      Function equiv has 125 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      QUnit.equiv = (function() {
                                      
                                          // Call the o related callback with the given arguments.
                                          function bindCallbacks( o, callbacks, args ) {
                                              var prop = QUnit.objectType( o );
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language