adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

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

    var l = droppable.offset.left, r = l + droppable.proportions.width,
        t = droppable.offset.top, b = t + droppable.proportions.height;
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.draggable.js on lines 740..741

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

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 (!windowResizing) {
            windowResizing = true;

            // We don't need any fancy debouncing here - we just need to react before the user can start
            // resizing any panels at the new window size. So just listen for first mousemove once the
Severity: Major
Found in src/view/WorkspaceManager.js and 1 other location - About 1 hr to fix
src/utils/Resizer.js on lines 549..559

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

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 ( toShow.length && toHide.length ) {
            toHide.prev().attr( "tabIndex", -1 );
        } else if ( toShow.length ) {
            this.headers.filter(function() {
                return $( this ).attr( "tabIndex" ) === 0;
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.tabs.js on lines 627..634

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

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 x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
            y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.droppable.js on lines 151..152

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

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 ( toShow.length && toHide.length ) {
            eventData.oldTab.attr( "tabIndex", -1 );
        } else if ( toShow.length ) {
            this.tabs.filter(function() {
                return $( this ).attr( "tabIndex" ) === 0;
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.accordion.js on lines 464..471

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

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 (_canHandleTrigger("#", plugins)) {
            CommandManager.get(Commands.NAVIGATE_GOTO_DEFINITION_PROJECT).setEnabled(true);
        } else {
            CommandManager.get(Commands.NAVIGATE_GOTO_DEFINITION_PROJECT).setEnabled(false);
        }
Severity: Major
Found in src/search/QuickOpen.js and 1 other location - About 1 hr to fix
src/search/QuickOpen.js on lines 801..805

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

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

Consider simplifying this complex logical expression.
Open

            if ( match[1] === "nth" ) {
                if ( !match[2] ) {
                    Sizzle.error( match[0] );
                }

    Consider simplifying this complex logical expression.
    Open

                            } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
                                diff = cache[1];
    
                            // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
                            } else {
    Severity: Critical
    Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                  if ( start && start[ 3 ] !== unit ) {
                      // Trust units reported by jQuery.css
                      unit = unit || start[ 3 ];
      
                      // Make sure we update the tween properties later on
      Severity: Critical
      Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

        Function _cmdDownloadFile has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function _cmdDownloadFile(downloadId, url, proxy, callback, pCallback) {
            // Backwards compatibility check, added in 0.37
            if (typeof proxy === "function") {
                callback = proxy;
                proxy = undefined;
        Severity: Minor
        Found in src/extensibility/node/ExtensionManagerDomain.js - About 1 hr to fix

          Function _performNpmInstall has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function _performNpmInstall(installDirectory, npmOptions, callback) {
              var npmPath = path.resolve(path.dirname(require.resolve("npm")), "..", "bin", "npm-cli.js");
              var args = [npmPath, "install"].concat(npmOptions);
          
              console.log("running npm " + args.slice(1).join(" ") + " in " + installDirectory);
          Severity: Minor
          Found in src/extensibility/node/npm-installer.js - About 1 hr to fix

            Function validatePhpExecutable has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function validatePhpExecutable(confParams) {
                executablePath = confParams["executablePath"] ||
                    (process.platform === 'win32' ? 'php.exe' : 'php');
            
                memoryLimit = confParams["memoryLimit"] || '4095M';
            Severity: Minor
            Found in src/extensions/default/PhpTooling/client.js - About 1 hr to fix

              Function expectSymbols has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function expectSymbols(provider, query, expectedSymbols) {
                          var requestStatus = null;
                          var request,
                              matcher;
              
              
              Severity: Minor
              Found in src/extensions/default/PhpTooling/unittests.js - About 1 hr to fix

                Function showErrorPopUp has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function showErrorPopUp(err) {
                        if(!err) {
                            return;
                        }
                        var localizedErrStr = "";
                Severity: Minor
                Found in src/extensions/default/PhpTooling/main.js - About 1 hr to fix

                  Function expectParameterHint has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          function expectParameterHint(expectedParams, expectedParameter) {
                              var requestStatus = null;
                              var request,
                                  complete = false;
                              runs(function () {
                  Severity: Minor
                  Found in src/extensions/default/PhpTooling/unittests.js - About 1 hr to fix

                    Function _dialogDatepicker has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _dialogDatepicker: function(input, date, onSelect, settings, pos) {
                            var inst = this._dialogInst; // internal instance
                            if (!inst) {
                                this.uuid += 1;
                                var id = 'dp' + this.uuid;

                      Function _setupHeightStyle has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _setupHeightStyle: function( heightStyle ) {
                              var maxHeight, overflow,
                                  parent = this.element.parent();
                      
                              if ( heightStyle === "fill" ) {

                        Function top has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                top: function( position, data ) {
                                    var within = data.within,
                                        withinOffset = within.offset.top + within.scrollTop,
                                        outerHeight = within.height,
                                        offsetTop = within.isWindow ? 0 : within.offset.top,

                          Function _position has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              _position: function( position ) {
                                  var myAt = [],
                                      offset = [ 0, 0 ],
                                      isVisible;
                          
                          

                            Function _keydown has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                _keydown: function( event ) {
                                    if ( event.altKey || event.ctrlKey ) {
                                        return;
                                    }
                            
                            
                              Severity
                              Category
                              Status
                              Source
                              Language