adobe/brackets

View on GitHub

Showing 1,485 of 3,294 total issues

Function insertCssHint has 62 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    UrlCodeHints.prototype.insertCssHint = function (completion) {
        var cursor = this.editor.getCursorPos(),
            start  = { line: cursor.line, ch: cursor.ch },
            end    = { line: cursor.line, ch: cursor.ch };

Severity: Major
Found in src/extensions/default/UrlCodeHints/main.js - About 2 hrs to fix

    Function exps has 62 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        infix('(', function (left, that) {
            if (prevtoken.id !== '}' && prevtoken.id !== ')') {
                nobreak(prevtoken, token);
            }
            nospace();

      Function insertHint has 62 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          AttrHints.prototype.insertHint = function (completion) {
              var cursor = this.editor.getCursorPos(),
                  start = {line: -1, ch: -1},
                  end = {line: -1, ch: -1},
                  tokenType = this.tagInfo.position.tokenType,
      Severity: Major
      Found in src/extensions/default/HTMLCodeHints/main.js - About 2 hrs to fix

        Function _buildListView has 61 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            CodeHintList.prototype._buildListView = function (hintObj) {
                var self            = this,
                    match           = hintObj.match,
                    selectInitial   = hintObj.selectInitial,
                    view            = { hints: [] },
        Severity: Major
        Found in src/editor/CodeHintList.js - About 2 hrs to fix

          Function JSDocumentModule has 61 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          define(function JSDocumentModule(require, exports, module) {
              "use strict";
          
              var EventDispatcher = require("utils/EventDispatcher"),
                  Inspector       = require("LiveDevelopment/Inspector/Inspector"),
          Severity: Major
          Found in src/LiveDevelopment/Documents/JSDocument.js - About 2 hrs to fix

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

                _create: function() {
                    var panel,
                        that = this,
                        options = this.options,
                        active = options.active;

              Function _mouseStart has 61 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _mouseStart: function(event, overrideHandle, noActivation) {
              
                      var o = this.options;
                      this.currentContainer = this;
              
              

                Function openDroppedFiles has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function openDroppedFiles(paths) {
                        var errorFiles = [],
                            ERR_MULTIPLE_ITEMS_WITH_DIR = {};
                
                        return Async.doInParallel(paths, function (path, idx) {
                Severity: Major
                Found in src/utils/DragAndDrop.js - About 2 hrs to fix

                  Function connect has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      NodeConnection.prototype.connect = function (autoReconnect) {
                          var self = this;
                          self._autoReconnect = autoReconnect;
                          var deferred = $.Deferred();
                          var attemptCount = 0;
                  Severity: Major
                  Found in src/utils/NodeConnection.js - About 2 hrs to fix

                    Function superMatcher has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            superMatcher = function( seed, context, xml, results, outermost ) {
                                var elem, j, matcher,
                                    matchedCount = 0,
                                    i = "0",
                                    unmatched = seed && [],
                    Severity: Major
                    Found in src/thirdparty/jquery-2.1.3.js - About 2 hrs to fix

                      Function _parseDeclarationList has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              function _parseDeclarationList(level) {
                      
                                  var j;
                                  declListStartLine = Math.min(line, lineCount - 1);
                                  declListStartChar = stream.start;
                      Severity: Major
                      Found in src/language/CSSUtils.js - About 2 hrs to fix

                        Function initWith has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          $.fn.twipsy.initWith = function (options, Constructor, name) {
                            var twipsy
                              , binder
                              , eventIn
                              , eventOut
                        Severity: Major
                        Found in src/widgets/bootstrap-twipsy-mod.js - About 2 hrs to fix

                          Function LiveCSSDocumentModule has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                          Open

                          define(function LiveCSSDocumentModule(require, exports, module) {
                              "use strict";
                          
                              var _               = require("thirdparty/lodash"),
                                  CSSUtils        = require("language/CSSUtils"),
                          Severity: Minor
                          Found in src/LiveDevelopment/MultiBrowserImpl/documents/LiveCSSDocument.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

                          File main.js has 267 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/LiveDevelopment/main.js - About 2 hrs to fix

                            Function _getInitialDocFromCurrent has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function _getInitialDocFromCurrent() {
                                    var doc = _getCurrentDocument(),
                                        refPath,
                                        i;
                            
                            
                            Severity: Major
                            Found in src/LiveDevelopment/LiveDevelopment.js - About 2 hrs to fix

                              Function _getInitialDocFromCurrent has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function _getInitialDocFromCurrent() {
                                      var doc = DocumentManager.getCurrentDocument(),
                                          refPath,
                                          i;
                              
                              
                              Severity: Major
                              Found in src/LiveDevelopment/LiveDevMultiBrowser.js - About 2 hrs to fix

                                Function getHealthData has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function getHealthData() {
                                        var result = new $.Deferred(),
                                            oneTimeHealthData = {};
                                
                                        oneTimeHealthData.snapshotTime = Date.now();
                                Severity: Major
                                Found in src/extensions/default/HealthData/HealthDataManager.js - About 2 hrs to fix

                                  Function domManip has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      domManip: function( args, table, callback ) {
                                          var results, first, fragment, parent,
                                              value = args[0],
                                              scripts = [];
                                  
                                  

                                    Function addMatch has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            function addMatch(match) {
                                                // Pull off the character index
                                                var c = match.index;
                                                var newPoints = 0;
                                    
                                    
                                    Severity: Major
                                    Found in src/utils/StringMatch.js - About 2 hrs to fix

                                      Function _getTagAttributes has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          function _getTagAttributes(editor, constPos) {
                                              var pos, ctx, ctxPrev, ctxNext, ctxTemp, tagName, exclusionList = [], shouldReplace;
                                      
                                              pos = $.extend({}, constPos);
                                              ctx = TokenUtils.getInitialContext(editor._codeMirror, pos);
                                      Severity: Major
                                      Found in src/language/XMLUtils.js - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language