adobe/brackets

View on GitHub

Showing 1,485 of 3,294 total issues

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 );

    Consider simplifying this complex logical expression.
    Open

                if ( event.pageX == null && original.clientX != null ) {
                    eventDoc = event.target.ownerDocument || document;
                    doc = eventDoc.documentElement;
                    body = eventDoc.body;
    
    
    Severity: Critical
    Found in src/thirdparty/jquery-2.1.3.js - About 5 hrs to fix

      Function _cmdInstall has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
      Open

      function _cmdInstall(packagePath, destinationDirectory, options, callback, pCallback, _doUpdate) {
          if (!options || !options.disabledDirectory || !options.apiVersion || !options.systemExtensionDirectory) {
              callback(new Error(Errors.MISSING_REQUIRED_OPTIONS), null);
              return;
          }
      Severity: Minor
      Found in src/extensibility/node/ExtensionManagerDomain.js - About 4 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 AutoUpdateDomain.js has 367 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*
       * Copyright (c) 2018 - 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/extensions/default/AutoUpdate/node/AutoUpdateDomain.js - About 4 hrs to fix

        Function itself has 118 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            var itself = function (s, o, g) {
                var a, i, k;
                JSHINT.errors = [];
                JSHINT.undefs = [];
                predefined = Object.create(standard);

          Function findSelectorAtDocumentPos has 118 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function findSelectorAtDocumentPos(editor, pos) {
                  var cm = editor._codeMirror;
                  var ctx = TokenUtils.getInitialContext(cm, $.extend({}, pos));
                  var selector = "", foundChars = false;
                  var isPreprocessorDoc = isCSSPreprocessorFile(editor.document.file.fullPath);
          Severity: Major
          Found in src/language/CSSUtils.js - About 4 hrs to fix

            File EditorStatusBar.js has 363 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/editor/EditorStatusBar.js - About 4 hrs to fix

              Function getParameters has 117 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function getParameters(inferFnType) {
              
                  // work around define functions before use warning.
                  var recordTypeToString, inferTypeToString, processInferFnTypeParameters, inferFnTypeToString;
              
              
              Severity: Major
              Found in src/JSUtils/node/TernNodeDomain.js - About 4 hrs to fix

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

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

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

                          x.nud = function () {
                              var b, f, i, j, p, t;
                              var props = {}; // All properties, including accessors
                  
                              function saveProperty(name, token) {

                    Function diff has 114 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    QUnit.diff = (function() {
                        function diff( o, n ) {
                            var i,
                                ns = {},
                                os = {};

                      Function braceExpand has 114 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function braceExpand (pattern, options) {
                        options = options || this.options
                        pattern = typeof pattern === "undefined"
                          ? this.pattern : pattern
                      
                      
                      Severity: Major
                      Found in src/thirdparty/globmatch.js - About 4 hrs to fix

                        File DOMNode.js has 356 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/Agents/DOMNode.js - About 4 hrs to fix

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

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

                            Function _enterState has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                InstallExtensionDialog.prototype._enterState = function (newState) {
                                    var url,
                                        msg,
                                        self = this,
                                        prevState = this._state;
                            Severity: Major
                            Found in src/extensibility/InstallExtensionDialog.js - About 4 hrs to fix

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

                              function init(domainManager) {
                                  _domainManager = domainManager;
                              
                                  if (!domainManager.hasDomain("staticServer")) {
                                      domainManager.registerDomain("staticServer", {major: 0, minor: 1});
                              Severity: Major
                              Found in src/extensions/default/StaticServer/node/StaticServerDomain.js - About 4 hrs to fix

                                File HTMLSimpleDOM.js has 353 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/HTMLSimpleDOM.js - About 4 hrs to fix

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

                                  function init(domainManager) {
                                      if (!domainManager.hasDomain("FindInFiles")) {
                                          domainManager.registerDomain("FindInFiles", {major: 0, minor: 1});
                                      }
                                      _domainManager = domainManager;
                                  Severity: Major
                                  Found in src/search/node/FindInFilesDomain.js - About 4 hrs to fix

                                    Function report has 110 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        itself.report = function (option) {
                                            var data = itself.data();
                                    
                                            var a = [], c, e, err, f, i, k, l, m = '', n, o = [], s;
                                    
                                    

                                      Function CSSAgent has 109 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      define(function CSSAgent(require, exports, module) {
                                          "use strict";
                                      
                                          var _ = require("thirdparty/lodash");
                                      
                                      
                                      Severity: Major
                                      Found in src/LiveDevelopment/Agents/CSSAgent.js - About 4 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language