adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

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

            it("should rename function name", function() {
                testEditor.setSelection({line: 140, ch: 17}, {line: 140, ch: 17});

                var selections = testEditor.getSelections();

Severity: Major
Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 1 other location - About 1 day to fix
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 632..648

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

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 rename variable name", function() {
                testEditor.setSelection({line: 165, ch: 6}, {line: 165, ch: 6});

                var selections = testEditor.getSelections();

Severity: Major
Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 1 other location - About 1 day to fix
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 614..630

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

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 _getSortedTagMarks(marks, markCache) {
        marks = marks.filter(function (mark) {
            return !!mark.tagID;
        }).map(function (mark) {
            // All marks should exist since we just got them from CodeMirror.
Severity: Major
Found in src/language/HTMLInstrumentation.js and 1 other location - About 1 day to fix
src/LiveDevelopment/MultiBrowserImpl/language/HTMLInstrumentation.js on lines 103..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 237.

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 _getSortedTagMarks(marks, markCache) {
        marks = marks.filter(function (mark) {
            return !!mark.tagID;
        }).map(function (mark) {
            // All marks should exist since we just got them from CodeMirror.
src/language/HTMLInstrumentation.js on lines 119..136

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

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 TernNodeDomain.js has 587 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright (c) 2017 - 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/JSUtils/node/TernNodeDomain.js - About 1 day to fix

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

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

      File HTMLTokenizer.js has 583 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/language/HTMLTokenizer.js - About 1 day to fix

        File search.php has 581 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        sleep( 3 );
        // no term passed - just exit early with no response
        if (empty($_GET['term'])) exit ;

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

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

            Function makeResizable has 244 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function makeResizable(element, direction, position, minSize, collapsible, forceLeft, createdByWorkspaceManager, usePercentages, _attachToParent) {
                    var $resizer            = $('<div class="' + direction + '-resizer"></div>'),
                        $element            = $(element),
                        $parent             = $element.parent(),
                        $resizableElement   = $($element.find(".resizable-content:first")[0]),
            Severity: Major
            Found in src/utils/Resizer.js - About 1 day to fix

              File unittests.js has 571 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*
               * Copyright (c) 2019 - present Adobe. 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/PhpTooling/unittests.js - About 1 day to fix

                Function ajax has 242 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    ajax: function( url, options ) {
                
                        // If url is an object, simulate pre-1.5 signature
                        if ( typeof url === "object" ) {
                            options = url;

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

                              it("should insert, not replace, property hints with no current query", function () {
                                  var start   = { line: 6, ch: 0 },
                                      middle  = { line: 6, ch: 3 },
                                      end     = { line: 6, ch: 8 },
                                      endplus = { line: 6, ch: 12 };
                  Severity: Major
                  Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 1 day to fix
                  src/extensions/default/JavaScriptCodeHints/unittests.js on lines 773..788
                  src/extensions/default/JavaScriptCodeHints/unittests.js on lines 790..806

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

                  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 replace property hints replacing a partial current query", function () {
                                  var start   = { line: 6, ch: 0 },
                                      middle  = { line: 6, ch: 6 },
                                      end     = { line: 6, ch: 8 },
                                      endplus = { line: 6, ch: 10 };
                  Severity: Major
                  Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 1 day to fix
                  src/extensions/default/JavaScriptCodeHints/unittests.js on lines 739..755
                  src/extensions/default/JavaScriptCodeHints/unittests.js on lines 790..806

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

                  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 replace property hints but not following delimiters", function () {
                                  var start   = { line: 6, ch: 0 },
                                      middle  = { line: 6, ch: 4 },
                                      end     = { line: 6, ch: 9 },
                                      endplus = { line: 6, ch: 14 };
                  Severity: Major
                  Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 1 day to fix
                  src/extensions/default/JavaScriptCodeHints/unittests.js on lines 739..755
                  src/extensions/default/JavaScriptCodeHints/unittests.js on lines 773..788

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

                  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 unittests.js has 568 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/JavaScriptRefactoring/unittests.js - About 1 day to fix

                    Function ajax has 240 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        ajax: function( url, options ) {
                    
                            // If url is an object, simulate pre-1.5 signature
                            if ( typeof url === "object" ) {
                                options = url;
                    Severity: Major
                    Found in src/thirdparty/jquery-2.1.3.js - About 1 day to fix

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

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

                        File main.js has 562 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /*
                         * Copyright (c) 2016 - 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/NavigationAndHistory/main.js - About 1 day to fix

                          File main.js has 556 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/QuickView/main.js - About 1 day to fix
                            Severity
                            Category
                            Status
                            Source
                            Language