adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

Consider simplifying this complex logical expression.
Open

            if ( matcher[ expando ] ) {
                // Find the next relative operator (if any) for proper handling
                j = ++i;
                for ( ; j < len; j++ ) {
                    if ( Expr.relative[ tokens[j].type ] ) {
Severity: Major
Found in src/thirdparty/jquery-2.1.3.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

            if ( s.crossDomain == null ) {
                parts = rurl.exec( s.url.toLowerCase() );
                s.crossDomain = !!( parts &&
                    ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
                        ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
    Severity: Major
    Found in src/thirdparty/jquery-2.1.3.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

          if ( support.matchesSelector && documentIsHTML &&
              ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
              ( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
      
              try {
      Severity: Major
      Found in src/thirdparty/jquery-2.1.3.js - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                    if (isPriorAttr &&
                            (!ctx.token.type ||
                            (ctx.token.type && ctx.token.type !== "attribute" &&
                                ctx.token.type.indexOf("error") === -1 &&
                                ctx.token.string.indexOf("<") !== -1))) {
        Severity: Major
        Found in src/language/HTMLUtils.js - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                  if (!language._setId(id) || !language._setName(name) ||
                          (blockComment && !language.setBlockCommentSyntax(blockComment[0], blockComment[1])) ||
                          (lineComment && !language.setLineCommentSyntax(lineComment))) {
                      result.reject();
                      return result.promise();
          Severity: Major
          Found in src/language/LanguageManager.js - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                    if ((!selector && !foundChars && !isPreprocessorDoc) ||
                            (isPreprocessorDoc && (ctx.token.string === "" || /\s+/.test(ctx.token.string)))) {
                        if (TokenUtils.moveNextToken(ctx) && ctx.token.type !== "comment" && _hasNonWhitespace(ctx.token.string)) {
                            foundChars = true;
                            ctx = TokenUtils.getInitialContext(cm, $.extend({}, pos));
            Severity: Major
            Found in src/language/CSSUtils.js - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                      if (query.length <= 1 || !regInfo ||
                              (regInfo[1] && isNaN(regInfo[1])) ||
                              (regInfo[3] && isNaN(regInfo[3]))) {
              
                          return null;
              Severity: Major
              Found in src/search/QuickOpen.js - About 40 mins to fix

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

                        Object.defineProperty(this,  "$content", {
                            get: function () {
                                return $content;
                            },
                            set: function () {
                Severity: Major
                Found in src/view/Pane.js and 6 other locations - About 40 mins to fix
                src/view/Pane.js on lines 319..326
                src/view/Pane.js on lines 328..335
                src/view/Pane.js on lines 337..344
                src/view/Pane.js on lines 346..353
                src/view/Pane.js on lines 355..362
                src/view/Pane.js on lines 373..380

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

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

                        Object.defineProperty(this,  "$header", {
                            get: function () {
                                return $header;
                            },
                            set: function () {
                Severity: Major
                Found in src/view/Pane.js and 6 other locations - About 40 mins to fix
                src/view/Pane.js on lines 319..326
                src/view/Pane.js on lines 337..344
                src/view/Pane.js on lines 346..353
                src/view/Pane.js on lines 355..362
                src/view/Pane.js on lines 364..371
                src/view/Pane.js on lines 373..380

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

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

                        Object.defineProperty(this,  "$container", {
                            get: function () {
                                return $container;
                            },
                            set: function () {
                Severity: Major
                Found in src/view/Pane.js and 6 other locations - About 40 mins to fix
                src/view/Pane.js on lines 319..326
                src/view/Pane.js on lines 328..335
                src/view/Pane.js on lines 337..344
                src/view/Pane.js on lines 346..353
                src/view/Pane.js on lines 355..362
                src/view/Pane.js on lines 364..371

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

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

                        Object.defineProperty(this,  "$el", {
                            get: function () {
                                return $el;
                            },
                            set: function () {
                Severity: Major
                Found in src/view/Pane.js and 6 other locations - About 40 mins to fix
                src/view/Pane.js on lines 328..335
                src/view/Pane.js on lines 337..344
                src/view/Pane.js on lines 346..353
                src/view/Pane.js on lines 355..362
                src/view/Pane.js on lines 364..371
                src/view/Pane.js on lines 373..380

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

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

                        Object.defineProperty(this,  "$headerText", {
                            get: function () {
                                return $headerText;
                            },
                            set: function () {
                Severity: Major
                Found in src/view/Pane.js and 6 other locations - About 40 mins to fix
                src/view/Pane.js on lines 319..326
                src/view/Pane.js on lines 328..335
                src/view/Pane.js on lines 346..353
                src/view/Pane.js on lines 355..362
                src/view/Pane.js on lines 364..371
                src/view/Pane.js on lines 373..380

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

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

                        Object.defineProperty(this,  "$headerCloseBtn", {
                            get: function () {
                                return $headerCloseBtn;
                            },
                            set: function () {
                Severity: Major
                Found in src/view/Pane.js and 6 other locations - About 40 mins to fix
                src/view/Pane.js on lines 319..326
                src/view/Pane.js on lines 328..335
                src/view/Pane.js on lines 337..344
                src/view/Pane.js on lines 346..353
                src/view/Pane.js on lines 364..371
                src/view/Pane.js on lines 373..380

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

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

                        Object.defineProperty(this,  "$headerFlipViewBtn", {
                            get: function () {
                                return $headerFlipViewBtn;
                            },
                            set: function () {
                Severity: Major
                Found in src/view/Pane.js and 6 other locations - About 40 mins to fix
                src/view/Pane.js on lines 319..326
                src/view/Pane.js on lines 328..335
                src/view/Pane.js on lines 337..344
                src/view/Pane.js on lines 355..362
                src/view/Pane.js on lines 364..371
                src/view/Pane.js on lines 373..380

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

                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

                        if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                            return;
                        }
                Severity: Minor
                Found in src/thirdparty/jquery-2.1.3.js and 1 other location - About 40 mins to fix
                src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 6621..6623

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

                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

                            if (token.type === "error") {
                                PerfUtils.finalizeMeasurement(timerBuildFull);  // discard
                                PerfUtils.addMeasurement(timerBuildPart);       // use
                                this._logError(token);
                                return null;
                Severity: Minor
                Found in src/language/HTMLSimpleDOM.js and 1 other location - About 40 mins to fix
                src/LiveDevelopment/MultiBrowserImpl/language/HTMLSimpleDOM.js on lines 299..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 48.

                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

                      for (var len = entries.length; idx < len; idx++) {
                        if (is(key, entries[idx][0])) {
                          break;
                        }
                      }
                Severity: Minor
                Found in src/thirdparty/immutable.js and 1 other location - About 40 mins to fix
                src/thirdparty/immutable.js on lines 1433..1437

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

                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

                                runs(function () {
                                    testEditor.setCursorPos(start);
                                    var hintObj = expectHints(JSCodeHints.jsHintProvider);
                                    hintsPresentExact(hintObj, ["fun測试"]);
                                });
                Severity: Minor
                Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 40 mins to fix
                src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1720..1724
                src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1740..1744

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

                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 at the end of closing tag", function () {
                                // Before > in </title>
                                testEditor.setCursorPos({line: 3, ch: 41});
                                expectNoHints(SVGCodeHints.hintProvider);
                            });
                Severity: Major
                Found in src/extensions/default/SVGCodeHints/unittests.js and 3 other locations - About 40 mins to fix
                src/extensions/default/SVGCodeHints/unittests.js on lines 158..162
                src/extensions/default/SVGCodeHints/unittests.js on lines 164..168
                src/extensions/default/SVGCodeHints/unittests.js on lines 429..433

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

                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

                            self.query = context.token.string.slice(0, context.pos.ch - context.token.start);
                Severity: Minor
                Found in src/extensions/default/PhpTooling/CodeHintsProvider.js and 1 other location - About 40 mins to fix
                src/languageTools/DefaultProviders.js on lines 127..127

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

                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