adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

Function _getOffsetsForFunction has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function _getOffsetsForFunction(docEntries, functionName) {
        // Filter for documents that contain the named function
        var result              = new $.Deferred(),
            matchedDocuments    = [],
            rangeResults        = [];
Severity: Minor
Found in src/language/JSUtils.js - About 1 hr to fix

    Function toggleClass has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        toggleClass: function( value, stateVal ) {
            var type = typeof value;
    
            if ( typeof stateVal === "boolean" && type === "string" ) {
                return stateVal ? this.addClass( value ) : this.removeClass( value );
    Severity: Minor
    Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

      Function removeBefore has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          VNode.prototype.removeBefore = function(ownerID, level, index) {
            if (index === level ? 1 << level : 0 || this.array.length === 0) {
              return this;
            }
            var originIndex = (index >>> level) & MASK;
      Severity: Minor
      Found in src/thirdparty/immutable.js - About 1 hr to fix

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

        module.exports = function (grunt) {
            var common      = {},
                path        = require("path"),
                _platform;
        
        
        Severity: Minor
        Found in tasks/lib/common.js - About 1 hr to fix

          Function getNextPageofSearchResults has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function getNextPageofSearchResults() {
                  var searchDeferred = $.Deferred();
                  if (searchModel.allResultsAvailable) {
                      return searchDeferred.resolve().promise();
                  }
          Severity: Minor
          Found in src/search/FindInFiles.js - About 1 hr to fix

            Function highlightMatch has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function highlightMatch(item, matchClass, rangeFilter) {
                    var label = item.label || item;
                    matchClass = matchClass || "quicksearch-namematch";
            
                    var stringRanges = item.stringRanges;
            Severity: Minor
            Found in src/search/QuickOpen.js - About 1 hr to fix

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

                    if (this.__ownerID) {
                      this.size = newSize;
                      this._head = head;
                      this.__hash = undefined;
                      this.__altered = true;
              Severity: Major
              Found in src/thirdparty/immutable.js and 2 other locations - About 1 hr to fix
              src/thirdparty/immutable.js on lines 4069..4075
              src/thirdparty/immutable.js on lines 4094..4100

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

              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 3 locations. Consider refactoring.
              Open

                    if (this.__ownerID) {
                      this.size = newSize;
                      this._head = head;
                      this.__hash = undefined;
                      this.__altered = true;
              Severity: Major
              Found in src/thirdparty/immutable.js and 2 other locations - About 1 hr to fix
              src/thirdparty/immutable.js on lines 4094..4100
              src/thirdparty/immutable.js on lines 4149..4155

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

              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 3 locations. Consider refactoring.
              Open

                    if (this.__ownerID) {
                      this.size = newSize;
                      this._head = head;
                      this.__hash = undefined;
                      this.__altered = true;
              Severity: Major
              Found in src/thirdparty/immutable.js and 2 other locations - About 1 hr to fix
              src/thirdparty/immutable.js on lines 4069..4075
              src/thirdparty/immutable.js on lines 4149..4155

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

              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

                  Pane.prototype.findInViewList = function (fullPath) {
                      return _.findIndex(this._viewList, function (file) {
                          return file.fullPath === fullPath;
                      });
                  };
              Severity: Major
              Found in src/view/Pane.js and 2 other locations - About 1 hr to fix
              src/view/Pane.js on lines 741..745
              src/view/Pane.js on lines 753..757

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

              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

                  Pane.prototype.findInViewListAddedOrder = function (fullPath) {
                      return _.findIndex(this._viewListAddedOrder, function (file) {
                          return file.fullPath === fullPath;
                      });
                  };
              Severity: Major
              Found in src/view/Pane.js and 2 other locations - About 1 hr to fix
              src/view/Pane.js on lines 730..734
              src/view/Pane.js on lines 753..757

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

              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 4 locations. Consider refactoring.
              Open

                          it("should not hint for @import outside of url()", function () {
                              runs(function () {
                                  testEditor.setCursorPos({ line: 4, ch: 15 });
                                  expectNoHints(UrlCodeHints.hintProvider);
                              });
              Severity: Major
              Found in src/extensions/default/UrlCodeHints/unittests.js and 3 other locations - About 1 hr to fix
              src/extensions/default/UrlCodeHints/unittests.js on lines 188..193
              src/extensions/default/UrlCodeHints/unittests.js on lines 195..200
              src/extensions/default/UrlCodeHints/unittests.js on lines 281..286

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

              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 4 locations. Consider refactoring.
              Open

                          it("should not hint for background-image outside of url()", function () {
                              runs(function () {
                                  testEditor.setCursorPos({ line: 11, ch: 20 });
                                  expectNoHints(UrlCodeHints.hintProvider);
                              });
              Severity: Major
              Found in src/extensions/default/UrlCodeHints/unittests.js and 3 other locations - About 1 hr to fix
              src/extensions/default/UrlCodeHints/unittests.js on lines 188..193
              src/extensions/default/UrlCodeHints/unittests.js on lines 195..200
              src/extensions/default/UrlCodeHints/unittests.js on lines 274..279

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

              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

                      var absolutePath            = doc.file.fullPath,
                          liveDocument            = absolutePath && _server.get(absolutePath),
                          liveEditingEnabled      = liveDocument && liveDocument.isLiveEditingEnabled  && liveDocument.isLiveEditingEnabled();
              Severity: Major
              Found in src/LiveDevelopment/LiveDevMultiBrowser.js and 1 other location - About 1 hr to fix
              src/LiveDevelopment/LiveDevelopment.js on lines 1473..1475

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

              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

                  Pane.prototype.findInViewListMRUOrder = function (fullPath) {
                      return _.findIndex(this._viewListMRUOrder, function (file) {
                          return file.fullPath === fullPath;
                      });
                  };
              Severity: Major
              Found in src/view/Pane.js and 2 other locations - About 1 hr to fix
              src/view/Pane.js on lines 730..734
              src/view/Pane.js on lines 741..745

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

              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 4 locations. Consider refactoring.
              Open

                          it("should not hint for type attribute", function () {
                              runs(function () {
                                  testEditor.setCursorPos({ line: 15, ch: 21 });
                                  expectNoHints(UrlCodeHints.hintProvider);
                              });
              Severity: Major
              Found in src/extensions/default/UrlCodeHints/unittests.js and 3 other locations - About 1 hr to fix
              src/extensions/default/UrlCodeHints/unittests.js on lines 195..200
              src/extensions/default/UrlCodeHints/unittests.js on lines 274..279
              src/extensions/default/UrlCodeHints/unittests.js on lines 281..286

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

              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

                      var absolutePath            = doc.file.fullPath,
                          liveDocument            = absolutePath && _server.get(absolutePath),
                          liveEditingEnabled      = liveDocument && liveDocument.isLiveEditingEnabled  && liveDocument.isLiveEditingEnabled();
              Severity: Major
              Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 1 hr to fix
              src/LiveDevelopment/LiveDevMultiBrowser.js on lines 730..732

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

              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 4 locations. Consider refactoring.
              Open

                          it("should not hint in query part of url", function () {
                              runs(function () {
                                  testEditor.setCursorPos({ line: 20, ch: 31 });
                                  expectNoHints(UrlCodeHints.hintProvider);
                              });
              Severity: Major
              Found in src/extensions/default/UrlCodeHints/unittests.js and 3 other locations - About 1 hr to fix
              src/extensions/default/UrlCodeHints/unittests.js on lines 188..193
              src/extensions/default/UrlCodeHints/unittests.js on lines 274..279
              src/extensions/default/UrlCodeHints/unittests.js on lines 281..286

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

              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 _bracketsPath   = FileUtils.getNativeBracketsDirectoryPath(),
                      _modulePath     = FileUtils.getNativeModuleDirectoryPath(module),
                      _nodePath       = "node/LauncherDomain",
                      _domainPath     = [_bracketsPath, _modulePath, _nodePath].join("/"),
                      _nodeDomain     = new NodeDomain("launcher", _domainPath);
              Severity: Major
              Found in src/LiveDevelopment/MultiBrowserImpl/launchers/Launcher.js and 1 other location - About 1 hr to fix
              src/filesystem/impls/appshell/AppshellFileSystem.js on lines 61..65

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

              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

                                  expect(testDoc.getRange({line: 4, ch: 0}, {line: 7, ch: 1}))
                                      .toBe(
                                          "function extracted1() {\n" +
                                          "    var y = 34;\n"     +
                                          "    return y;\n"      +
              Severity: Major
              Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 1 other location - About 1 hr to fix
              src/extensions/default/JavaScriptRefactoring/unittests.js on lines 134..140

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

              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