adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

Function onConnectFail has 81 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        Inspector.connectToURL(launcherUrl).fail(function onConnectFail(err) {
            if (err === "CANCEL") {
                _openDeferred.reject(err);
                return;
            }
Severity: Major
Found in src/LiveDevelopment/LiveDevelopment.js - About 3 hrs to fix

    Function presentConflict has 81 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function presentConflict(docInfo, i) {
                var result = new $.Deferred(),
                    promise = result.promise(),
                    doc = docInfo.doc,
                    fileTime = docInfo.fileTime;
    Severity: Major
    Found in src/project/FileSyncManager.js - About 3 hrs to fix

      File AppshellFileSystem.js has 301 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/filesystem/impls/appshell/AppshellFileSystem.js - About 3 hrs to fix

        Function _keydownHook has 80 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            CodeHintList.prototype._keydownHook = function (event, isFakeKeydown) {
                var keyCode,
                    self = this;
        
                // positive distance rotates down; negative distance rotates up
        Severity: Major
        Found in src/editor/CodeHintList.js - About 3 hrs to fix

          Function _createServer has 80 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function _createServer(path, port, createCompleteCallback) {
              var server,
                  app,
                  address,
                  pathKey = getPathKey(path);
          Severity: Major
          Found in src/extensions/default/StaticServer/node/StaticServerDomain.js - About 3 hrs to fix

            Function ScriptAgent has 80 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            define(function ScriptAgent(require, exports, module) {
                "use strict";
            
                var Inspector = require("LiveDevelopment/Inspector/Inspector");
                var DOMAgent = require("LiveDevelopment/Agents/DOMAgent");
            Severity: Major
            Found in src/LiveDevelopment/Agents/ScriptAgent.js - About 3 hrs to fix

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

                  _create: function() {
                      this.originalTitle = this.element.attr( "title" );
                      // #5742 - .attr() might return a DOMElement
                      if ( typeof this.originalTitle !== "string" ) {
                          this.originalTitle = "";

                Function _generateMatchList has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function _generateMatchList(query, str, originalQuery, originalStr, specials, startingSpecial) {
                        var result = [];
                
                        // used to keep track of which special character we're testing now
                        var specialsCounter = startingSpecial;
                Severity: Major
                Found in src/utils/StringMatch.js - About 3 hrs to fix

                  Function _render has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      SearchResultsView.prototype._render = function () {
                          var searchItems, match, i, item, multiLine,
                              count            = this._model.countFilesMatches(),
                              searchFiles      = this._model.prioritizeOpenFile(this._initialFilePath),
                              lastIndex        = this._getLastIndex(count.matches),
                  Severity: Major
                  Found in src/search/SearchResultsView.js - About 3 hrs to fix

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                                    it("should undo a hue change", function () {
                                        makeUI("rgba(100, 150, 200, 0.3)");
                                        runs(function () {
                                            eventAtRatio("mousedown", colorEditor.$hueBase, [0, 0.5]);
                                            triggerCtrlKey(colorEditor.$hueBase, KeyEvent.DOM_VK_Z);
                    Severity: Major
                    Found in src/extensions/default/InlineColorEditor/unittests.js and 2 other locations - About 3 hrs to fix
                    src/extensions/default/InlineColorEditor/unittests.js on lines 1465..1473
                    src/extensions/default/InlineColorEditor/unittests.js on lines 1483..1491

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 99.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                                } else if (this._state === AFTER_COMMENT_2) {
                                    if (c === ">") {
                                        //remove 2 trailing chars
                                        // It should be okay to just decrement the char position by 2 because we know neither of the previous
                                        // characters is a newline.
                    Severity: Major
                    Found in src/language/HTMLTokenizer.js and 1 other location - About 3 hrs to fix
                    src/language/HTMLTokenizer.js on lines 503..670

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 99.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                        function _closeDocuments() {
                            if (_liveDocument) {
                                _closeDocument(_liveDocument);
                                _liveDocument = undefined;
                            }
                    Severity: Major
                    Found in src/LiveDevelopment/LiveDevMultiBrowser.js and 1 other location - About 3 hrs to fix
                    src/LiveDevelopment/LiveDevelopment.js on lines 388..403

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 99.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                                    it("should undo an opacity change", function () {
                                        makeUI("rgba(100, 150, 200, 0.3)");
                                        runs(function () {
                                            eventAtRatio("mousedown", colorEditor.$opacitySelector, [0, 0.5]);
                                            triggerCtrlKey(colorEditor.$opacitySelector, KeyEvent.DOM_VK_Z);
                    Severity: Major
                    Found in src/extensions/default/InlineColorEditor/unittests.js and 2 other locations - About 3 hrs to fix
                    src/extensions/default/InlineColorEditor/unittests.js on lines 1465..1473
                    src/extensions/default/InlineColorEditor/unittests.js on lines 1474..1482

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 99.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                        function _closeDocuments() {
                            if (_liveDocument) {
                                _closeDocument(_liveDocument);
                                _liveDocument = undefined;
                            }
                    Severity: Major
                    Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 3 hrs to fix
                    src/LiveDevelopment/LiveDevMultiBrowser.js on lines 217..232

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 99.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                                    it("should undo a saturation/value change", function () {
                                        makeUI("rgba(100, 150, 200, 0.3)");
                                        runs(function () {
                                            eventAtRatio("mousedown", colorEditor.$selectionBase, [0.5, 0.5]);
                                            triggerCtrlKey(colorEditor.$selectionBase, KeyEvent.DOM_VK_Z);
                    Severity: Major
                    Found in src/extensions/default/InlineColorEditor/unittests.js and 2 other locations - About 3 hrs to fix
                    src/extensions/default/InlineColorEditor/unittests.js on lines 1474..1482
                    src/extensions/default/InlineColorEditor/unittests.js on lines 1483..1491

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 99.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                                } else if (this._state === AFTER_CDATA_2) {
                                    if (c === ">") {
                                        //remove 2 trailing chars
                                        // It should be okay to just decrement the char position by 2 because we know neither of the previous
                                        // characters is a newline.
                    Severity: Major
                    Found in src/language/HTMLTokenizer.js and 1 other location - About 3 hrs to fix
                    src/language/HTMLTokenizer.js on lines 439..670

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 99.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Function doEditorChange has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function doEditorChange(session, document, previousDocument) {
                                var file        = document.file,
                                    path        = file.fullPath,
                                    dir         = file.parentPath,
                                    pr;
                    Severity: Major
                    Found in src/JSUtils/ScopeManager.js - About 3 hrs to fix

                      Function moveLine has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function moveLine(editor, direction) {
                              editor = editor || EditorManager.getFocusedEditor();
                              if (!editor) {
                                  return;
                              }
                      Severity: Major
                      Found in src/editor/EditorCommandHandlers.js - About 3 hrs to fix

                        Function _applyUserKeyBindings has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function _applyUserKeyBindings() {
                                var remappedCommands   = [],
                                    remappedKeys       = [],
                                    restrictedCommands = [],
                                    restrictedKeys     = [],
                        Severity: Major
                        Found in src/command/KeyBindingManager.js - About 3 hrs to fix

                          Function getHints has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              CssPropHints.prototype.getHints = function (implicitChar) {
                                  this.cursor = this.editor.getCursorPos();
                                  this.info = CSSUtils.getInfoAtPos(this.editor, this.cursor);
                          
                                  var needle = this.info.name,
                          Severity: Major
                          Found in src/extensions/default/CSSCodeHints/main.js - About 3 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language