adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

File KeyBindingManager.js has 776 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: Major
Found in src/command/KeyBindingManager.js - About 1 day to fix

    File ProjectManager.js has 762 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: Major
    Found in src/project/ProjectManager.js - About 1 day to fix

      Function DOMNodeModule has 353 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      define(function DOMNodeModule(require, exports, module) {
          "use strict";
      
          var DOMHelpers = require("LiveDevelopment/Agents/DOMHelpers");
      
      
      Severity: Major
      Found in src/LiveDevelopment/Agents/DOMNode.js - About 1 day to fix

        Function TernModule has 352 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function TernModule() {
                var ternPromise         = null,
                    addFilesPromise     = null,
                    rootTernDir         = null,
                    projectRoot         = null,
        Severity: Major
        Found in src/JSUtils/ScopeManager.js - About 1 day to fix

          File strings.js has 746 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: Major
          Found in src/nls/root/strings.js - About 1 day to fix

            File strings.js has 746 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: Major
            Found in src/nls/fr/strings.js - About 1 day to fix

              File strings.js has 746 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: Major
              Found in src/nls/ja/strings.js - About 1 day to fix

                File ProjectModel.js has 740 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*
                 * Copyright (c) 2014 - 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: Major
                Found in src/project/ProjectModel.js - About 1 day to fix

                  File unittests.js has 737 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: Major
                  Found in src/extensions/default/InlineTimingFunctionEditor/unittests.js - About 1 day to fix

                    Function DOMHelpersModule has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring.
                    Open

                    define(function DOMHelpersModule(require, exports, module) {
                        "use strict";
                    
                        /** Test if the given character is a quote character
                         * {char} source character
                    Severity: Minor
                    Found in src/LiveDevelopment/Agents/DOMHelpers.js - About 1 day 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 Pane.js has 730 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /*
                     * Copyright (c) 2014 - 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: Major
                    Found in src/view/Pane.js - About 1 day to fix

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

                          Object.defineProperties(RemoteFile.prototype, {
                              "fullPath": {
                                  get: function () { return this._path; },
                                  set: function () { throw new Error("Cannot set fullPath"); }
                              },
                      Severity: Major
                      Found in src/extensions/default/RemoteFileAdapter/RemoteFile.js and 1 other location - About 1 day to fix
                      src/filesystem/FileSystemEntry.js on lines 91..120

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

                      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

                          Object.defineProperties(FileSystemEntry.prototype, {
                              "fullPath": {
                                  get: function () { return this._path; },
                                  set: function () { throw new Error("Cannot set fullPath"); }
                              },
                      Severity: Major
                      Found in src/filesystem/FileSystemEntry.js and 1 other location - About 1 day to fix
                      src/extensions/default/RemoteFileAdapter/RemoteFile.js on lines 85..114

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

                      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

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

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

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

                                    } else if (token.type === "closetag") {
                                        // If this is a self-closing element, ignore the close tag.
                                        var closeTagName = token.contents.toLowerCase();
                                        if (!voidElements.hasOwnProperty(closeTagName)) {
                                            // Find the topmost item on the stack that matches. If we can't find one, assume
                        src/language/HTMLSimpleDOM.js on lines 408..481

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

                        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

                                    } else if (token.type === "closetag") {
                                        // If this is a self-closing element, ignore the close tag.
                                        var closeTagName = token.contents.toLowerCase();
                                        if (!voidElements.hasOwnProperty(closeTagName)) {
                                            // Find the topmost item on the stack that matches. If we can't find one, assume
                        Severity: Major
                        Found in src/language/HTMLSimpleDOM.js and 1 other location - About 1 day to fix
                        src/LiveDevelopment/MultiBrowserImpl/language/HTMLSimpleDOM.js on lines 370..443

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

                        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

                        File main.js has 718 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: Major
                        Found in src/extensions/default/AutoUpdate/main.js - About 1 day to fix

                          Function exports has 330 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          module.exports = function (grunt) {
                              // load dependencies
                              require('load-grunt-tasks')(grunt, {
                                  pattern: [
                                      'grunt-*',
                          Severity: Major
                          Found in Gruntfile.js - About 1 day to fix

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

                                _adjustOffsetFromHelper: function(obj) {
                                    if (typeof obj == 'string') {
                                        obj = obj.split(' ');
                                    }
                                    if ($.isArray(obj)) {
                            src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.draggable.js on lines 284..303

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

                            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

                                _adjustOffsetFromHelper: function(obj) {
                                    if (typeof obj == 'string') {
                                        obj = obj.split(' ');
                                    }
                                    if ($.isArray(obj)) {
                            src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.sortable.js on lines 777..796

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

                            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