adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

File StaticServerDomain.js has 266 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/extensions/default/StaticServer/node/StaticServerDomain.js - About 2 hrs to fix

    File ImageViewer.js has 265 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/ImageViewer.js - About 2 hrs to fix

      Function explode has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      $.effects.effect.explode = function( o, done ) {
      
          var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
              cells = rows,
              el = $( this ),

        Function _formatPref has 59 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function _formatPref(prefName,  prefItem, indentLevel) {
        
                // check for validity of the parameters being passed
                if (!prefItem || indentLevel < 0 || !prefName || !prefName.length) {
                    return "";
        Severity: Major
        Found in src/extensions/default/DebugCommands/main.js - About 2 hrs to fix

          Function _visitHelper has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              FileSystemEntry.prototype._visitHelper = function (stats, visitedPaths, visitor, options, callback) {
                  var maxDepth = options.maxDepth,
                      maxEntriesCounter = options.maxEntriesCounter,
                      sortList = options.sortList;
          
          
          Severity: Major
          Found in src/filesystem/FileSystemEntry.js - About 2 hrs to fix

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

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

              Function showDialog has 59 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function showDialog() {
                      var currentSettings = getValues();
                      var newSettings     = {};
                      var themes          = _.map(loadedThemes, function (theme) { return theme; });
                      var template        = $("<div>").append($settings).html();
              Severity: Major
              Found in src/view/ThemeSettings.js - About 2 hrs to fix

                Function CHILD has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        "CHILD": function( type, what, argument, first, last ) {
                            var simple = type.slice( 0, 3 ) !== "nth",
                                forward = type.slice( -4 ) !== "last",
                                ofType = what === "of-type";
                
                
                Severity: Major
                Found in src/thirdparty/jquery-2.1.3.js - About 2 hrs to fix

                  Function defineLanguage has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function defineLanguage(id, definition) {
                          var result = new $.Deferred();
                  
                          if (_pendingLanguages[id]) {
                              result.reject("Language \"" + id + "\" is waiting to be resolved.");
                  Severity: Major
                  Found in src/language/LanguageManager.js - About 2 hrs to fix

                    Function Deferred has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        Deferred: function( func ) {
                            var tuples = [
                                    // action, add listener, listener list, final state
                                    [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
                                    [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
                    Severity: Major
                    Found in src/thirdparty/jquery-2.1.3.js - About 2 hrs to fix

                      Function _createReaderAndWriteByCommunicationType has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function _createReaderAndWriteByCommunicationType(resp, type) {
                              var retval = null;
                      
                              switch (type) {
                                  case CommunicationTypes.NodeIPC.type:
                      Severity: Major
                      Found in src/languageTools/LanguageClient/ServerUtils.js - About 2 hrs to fix

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

                                    if (range && range.to.line - range.from.line >= minFoldSize) {
                                        cm._lineFolds[i] = range;
                                        i = range.to.line;
                                    } else {
                                        delete cm._lineFolds[i];
                        Severity: Major
                        Found in src/extensions/default/CodeFolding/unittest-files/test.js and 1 other location - About 2 hrs to fix
                        src/extensions/default/CodeFolding/foldhelpers/foldgutter.js on lines 175..180

                        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 82.

                        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

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

                                        if (range && range.to.line - range.from.line >= minFoldSize) {
                                            cm._lineFolds[i] = range;
                                            i = range.to.line;
                                        } else {
                                            delete cm._lineFolds[i];
                        Severity: Major
                        Found in src/extensions/default/CodeFolding/foldhelpers/foldgutter.js and 1 other location - About 2 hrs to fix
                        src/extensions/default/CodeFolding/unittest-files/test.js on lines 27..32

                        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 82.

                        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

                            var EditorManager       = brackets.getModule("editor/EditorManager"),
                                QuickOpen           = brackets.getModule("search/QuickOpen"),
                                QuickOpenHelper     = brackets.getModule("search/QuickOpenHelper"),
                                JSUtils             = brackets.getModule("language/JSUtils"),
                                DocumentManager     = brackets.getModule("document/DocumentManager"),
                        Severity: Major
                        Found in src/extensions/default/QuickOpenJavaScript/main.js and 1 other location - About 2 hrs to fix
                        src/extensions/default/QuickOpenCSS/main.js on lines 27..32

                        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 82.

                        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

                                    it("Should show linear gradient preview for those with colon or space before", function () {
                                        runs(function () {
                                            var expectedGradient = "linear-gradient(to bottom, black 0%, white 100%)";
                                            checkGradientAtPos(expectedGradient, 169, 25);   // space colon space
                                            checkGradientAtPos(expectedGradient, 170, 25);   // colon space
                        Severity: Major
                        Found in src/extensions/default/QuickView/unittests.js and 1 other location - About 2 hrs to fix
                        src/extensions/default/QuickView/unittests.js on lines 262..270

                        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 82.

                        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

                                    it("should list 7 value-name hints for shape-inside", function () {
                                        testEditor.setCursorPos({ line: 1, ch: 15 });    // after shape-inside
                                        var hintList = expectHints(CSSCodeHints.cssPropHintProvider);
                                        verifyAttrHints(hintList, "auto");  // first hint should be auto
                                        verifyAllValues(hintList, ["auto", "circle()", "ellipse()", "inherit", "outside-shape", "polygon()", "rectangle()"]);
                        Severity: Major
                        Found in src/extensions/default/CSSCodeHints/unittests.js and 1 other location - About 2 hrs to fix
                        src/extensions/default/CSSCodeHints/unittests.js on lines 702..707

                        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 82.

                        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

                                    it("should list more than 2 value hints for flow-from", function () {
                                        testEditor.setCursorPos({ line: 66, ch: 15 });    // after flow-from
                                        var hintList = expectHints(CSSCodeHints.cssPropHintProvider);
                                        verifyAttrHints(hintList, "edge-code_now_shipping");  // first hint should be edge-code_now_shipping
                                        verifyAllValues(hintList, ["edge-code_now_shipping", "inherit", "jeff", "lim", "main", "none", "randy"]);
                        Severity: Major
                        Found in src/extensions/default/CSSCodeHints/unittests.js and 1 other location - About 2 hrs to fix
                        src/extensions/default/CSSCodeHints/unittests.js on lines 623..628

                        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 82.

                        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 cleanInfoBar() {
                                var $infoBar = $('#info-bar-template');
                                if ($infoBar.length > 0) {
                                    $infoBar.remove();
                                }
                        Severity: Major
                        Found in src/widgets/infobar.js and 1 other location - About 2 hrs to fix
                        src/extensions/default/AutoUpdate/UpdateInfoBar.js on lines 78..85

                        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 82.

                        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

                                    it("Should show radial gradient preview for those with colon or space before", function () {
                                        runs(function () {
                                            var expectedGradient = "radial-gradient(red, white 50%, blue 100%)";
                                            checkGradientAtPos(expectedGradient, 176, 25);   // space colon space
                                            checkGradientAtPos(expectedGradient, 177, 25);   // colon space
                        Severity: Major
                        Found in src/extensions/default/QuickView/unittests.js and 1 other location - About 2 hrs to fix
                        src/extensions/default/QuickView/unittests.js on lines 252..260

                        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 82.

                        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

                                        SpecRunnerUtils.createTestWindowAndRun(this, function (w) {
                                            testWindow = w;
                                            CommandManager      = testWindow.brackets.test.CommandManager;
                                            EditorManager       = testWindow.brackets.test.EditorManager;
                                            PerfUtils           = testWindow.brackets.test.PerfUtils;
                        Severity: Major
                        Found in src/extensions/default/JavaScriptQuickEdit/unittests.js and 1 other location - About 2 hrs to fix
                        src/extensions/default/JavaScriptQuickEdit/unittests.js on lines 120..125

                        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 82.

                        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

                        Severity
                        Category
                        Status
                        Source
                        Language