adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

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

        to: {
            y: el.to.height / original.height,
            x: el.to.width / original.width
        }
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.effects.scale.js on lines 139..142

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

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

                if(fileSize <= 2) {
                    subType = "Size_1_2MB";
                } else if(fileSize <= 5) {
                    subType = "Size_2_5MB";
                } else {
Severity: Minor
Found in src/utils/HealthLogger.js and 1 other location - About 40 mins to fix
src/utils/HealthLogger.js on lines 235..241

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

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 move point P2 on mousedown in curve", function () {
                    testCubicBezierClick({
                        item:      "curve",
                        clickAt:   translatePointFromBezierToCanvas([0.6, 1.2]),
                        expected:  [".42", "0", ".6", "1.2"]
Severity: Minor
Found in src/extensions/default/InlineTimingFunctionEditor/unittests.js and 1 other location - About 40 mins to fix
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 682..688

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

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 _cmdUpdate has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

function _cmdUpdate(packagePath, destinationDirectory, options, callback, pCallback) {
Severity: Minor
Found in src/extensibility/node/ExtensionManagerDomain.js - About 35 mins to fix

    Function setSelection has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        Editor.prototype.setSelection = function (start, end, center, centerOptions, origin) {
    Severity: Minor
    Found in src/editor/Editor.js - About 35 mins to fix

      Function _createEditorForDocument has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          function _createEditorForDocument(doc, makeMasterEditor, container, range, editorOptions) {
      Severity: Minor
      Found in src/editor/EditorManager.js - About 35 mins to fix

        Function Editor has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            function Editor(document, makeMasterEditor, container, range, options) {
        Severity: Minor
        Found in src/editor/Editor.js - About 35 mins to fix

          Function _getLineCommentPrefixSuffixEdit has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              function _getLineCommentPrefixSuffixEdit(editor, prefix, suffix, lineSel, command) {
          Severity: Minor
          Found in src/editor/EditorCommandHandlers.js - About 35 mins to fix

            Function _getLineCommentPrefixEdit has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                function _getLineCommentPrefixEdit(editor, prefixes, blockPrefix, blockSuffix, lineSel) {
            Severity: Minor
            Found in src/editor/EditorCommandHandlers.js - About 35 mins to fix

              Function _buildKeyDescriptor has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  function _buildKeyDescriptor(hasMacCtrl, hasCtrl, hasAlt, hasShift, key) {
              Severity: Minor
              Found in src/command/KeyBindingManager.js - About 35 mins to fix

                Function _cmdDownloadFile has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                function _cmdDownloadFile(downloadId, url, proxy, callback, pCallback) {
                Severity: Minor
                Found in src/extensibility/node/ExtensionManagerDomain.js - About 35 mins to fix

                  Function getSessionHints has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      function getSessionHints(query, cursor, type, token, $deferredHints) {
                  Severity: Minor
                  Found in src/extensions/default/JavaScriptCodeHints/main.js - About 35 mins to fix

                    Function _find has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        function _find(src, match, skip, quotes, comments) {
                    Severity: Minor
                    Found in src/LiveDevelopment/Agents/DOMHelpers.js - About 35 mins to fix

                      Function LiveCSSDocument has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          var LiveCSSDocument = function LiveCSSDocument(protocol, urlResolver, doc, editor, roots) {
                      Severity: Minor
                      Found in src/LiveDevelopment/MultiBrowserImpl/documents/LiveCSSDocument.js - About 35 mins to fix

                        Function LiveDocument has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            function LiveDocument(protocol, urlResolver, doc, editor, roots) {
                        Severity: Minor
                        Found in src/LiveDevelopment/MultiBrowserImpl/documents/LiveDocument.js - About 35 mins to fix

                          Function _findEach has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              function _findEach(src, match, quotes, comments, callback) {
                          Severity: Minor
                          Found in src/LiveDevelopment/Agents/DOMHelpers.js - About 35 mins to fix

                            Function drawLine has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    drawLine: function (x1, y1, x2, y2, type) {
                            Severity: Minor
                            Found in src/extensions/default/InlineTimingFunctionEditor/StepEditor.js - About 35 mins to fix

                              Function _dialogDatepicker has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  _dialogDatepicker: function(input, date, onSelect, settings, pos) {

                                Function FileLocation has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    function FileLocation(fullPath, line, chFrom, chTo, id) {
                                Severity: Minor
                                Found in src/extensions/default/QuickOpenHTML/main.js - About 35 mins to fix

                                  Function toggleClass has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      toggleClass: function( classNames, force, speed, easing, callback ) {
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language