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 NOT hint before opening braces", function () {
                // Between "javascript": and {
                testEditor.setCursorPos({line: 10, ch: 22});
                expectNoHints(PrefsCodeHints.hintProvider);

Severity: Major
Found in src/extensions/default/PrefsCodeHints/unittests.js and 1 other location - About 2 hrs to fix
src/extensions/default/PrefsCodeHints/unittests.js on lines 477..485

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

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

LanguageClient.prototype.addOnNotificationHandler = function (type, handler) {
    if (validateHandler(handler)) {
        if (!this._onNotificationHandlers[type]) {
            this._onNotificationHandlers[type] = [];
        }
Severity: Major
Found in src/languageTools/LanguageClient/LanguageClient.js and 1 other location - About 2 hrs to fix
src/languageTools/LanguageClientWrapper.js on lines 610..617

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

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 makeStack(size, head, ownerID, hash) {
    var map = Object.create(StackPrototype);
    map.size = size;
    map._head = head;
    map.__ownerID = ownerID;
Severity: Major
Found in src/thirdparty/immutable.js and 1 other location - About 2 hrs to fix
src/thirdparty/immutable.js on lines 1802..1810

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

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 _installUsingDragAndDrop has 62 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function _installUsingDragAndDrop() {
        var installZips = [],
            updateZips = [],
            deferred = new $.Deferred(),
            validatePromise;
Severity: Major
Found in src/extensibility/ExtensionManagerDialog.js - About 2 hrs to fix

    Function insertCssHint has 62 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        UrlCodeHints.prototype.insertCssHint = function (completion) {
            var cursor = this.editor.getCursorPos(),
                start  = { line: cursor.line, ch: cursor.ch },
                end    = { line: cursor.line, ch: cursor.ch };
    
    
    Severity: Major
    Found in src/extensions/default/UrlCodeHints/main.js - About 2 hrs to fix

      Function exps has 62 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          infix('(', function (left, that) {
              if (prevtoken.id !== '}' && prevtoken.id !== ')') {
                  nobreak(prevtoken, token);
              }
              nospace();

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

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

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

                  function expectHints(provider, implicitChar, returnWholeObj) {
                      expect(provider.hasHints(testEditor, implicitChar)).toBe(true);
                      var hintsObj = provider.getHints();
                      expect(hintsObj).toBeTruthy();
                      // return just the array of hints if returnWholeObj is falsy
          Severity: Major
          Found in src/extensions/default/CSSAtRuleCodeHints/unittests.js and 1 other location - About 2 hrs to fix
          src/extensions/default/CSSPseudoSelectorHints/unittests.js on lines 67..73

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

          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

              keyHooks: {
                  props: "char charCode key keyCode".split(" "),
                  filter: function( event, original ) {
          
                      // Add which for key events
          src/thirdparty/jquery-2.1.3.js on lines 4501..4512

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

          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

              keyHooks: {
                  props: "char charCode key keyCode".split(" "),
                  filter: function( event, original ) {
          
                      // Add which for key events
          Severity: Major
          Found in src/thirdparty/jquery-2.1.3.js and 1 other location - About 2 hrs to fix
          src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 3359..3370

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

          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

                  function expectHints(provider, implicitChar, returnWholeObj) {
                      expect(provider.hasHints(testEditor, implicitChar)).toBe(true);
                      var hintsObj = provider.getHints();
                      expect(hintsObj).toBeTruthy();
                      // return just the array of hints if returnWholeObj is falsy
          Severity: Major
          Found in src/extensions/default/CSSPseudoSelectorHints/unittests.js and 1 other location - About 2 hrs to fix
          src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 61..67

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

          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 _buildListView has 61 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              CodeHintList.prototype._buildListView = function (hintObj) {
                  var self            = this,
                      match           = hintObj.match,
                      selectInitial   = hintObj.selectInitial,
                      view            = { hints: [] },
          Severity: Major
          Found in src/editor/CodeHintList.js - About 2 hrs to fix

            Function JSDocumentModule has 61 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            define(function JSDocumentModule(require, exports, module) {
                "use strict";
            
                var EventDispatcher = require("utils/EventDispatcher"),
                    Inspector       = require("LiveDevelopment/Inspector/Inspector"),
            Severity: Major
            Found in src/LiveDevelopment/Documents/JSDocument.js - About 2 hrs to fix

              Function _create has 61 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _create: function() {
                      var panel,
                          that = this,
                          options = this.options,
                          active = options.active;

                Function _mouseStart has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _mouseStart: function(event, overrideHandle, noActivation) {
                
                        var o = this.options;
                        this.currentContainer = this;
                
                

                  Function connect has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      NodeConnection.prototype.connect = function (autoReconnect) {
                          var self = this;
                          self._autoReconnect = autoReconnect;
                          var deferred = $.Deferred();
                          var attemptCount = 0;
                  Severity: Major
                  Found in src/utils/NodeConnection.js - About 2 hrs to fix

                    Function openDroppedFiles has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function openDroppedFiles(paths) {
                            var errorFiles = [],
                                ERR_MULTIPLE_ITEMS_WITH_DIR = {};
                    
                            return Async.doInParallel(paths, function (path, idx) {
                    Severity: Major
                    Found in src/utils/DragAndDrop.js - About 2 hrs to fix

                      Function _parseDeclarationList has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              function _parseDeclarationList(level) {
                      
                                  var j;
                                  declListStartLine = Math.min(line, lineCount - 1);
                                  declListStartChar = stream.start;
                      Severity: Major
                      Found in src/language/CSSUtils.js - About 2 hrs to fix

                        Function superMatcher has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                superMatcher = function( seed, context, xml, results, outermost ) {
                                    var elem, j, matcher,
                                        matchedCount = 0,
                                        i = "0",
                                        unmatched = seed && [],
                        Severity: Major
                        Found in src/thirdparty/jquery-2.1.3.js - About 2 hrs to fix

                          Function initWith has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            $.fn.twipsy.initWith = function (options, Constructor, name) {
                              var twipsy
                                , binder
                                , eventIn
                                , eventOut
                          Severity: Major
                          Found in src/widgets/bootstrap-twipsy-mod.js - About 2 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language