adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

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

            it("should extract tagged template literal", function () {
                testEditor.setSelection({line: 65, ch: 4}, {line: 65, ch: 29});

                var prevDocLength = testDoc.getText().length;

Severity: Major
Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 12 other locations - About 4 hrs to fix
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 100..111
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 113..124
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 145..156
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 176..187
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 189..200
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 214..225
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 227..238
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 240..251
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 253..264
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 266..277
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 292..303
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 365..376

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

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

            it("should extract binary expression", function () {
                testEditor.setSelection({line: 34, ch: 4}, {line: 34, ch: 13});

                var prevDocLength = testDoc.getText().length;

Severity: Major
Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 12 other locations - About 4 hrs to fix
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 100..111
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 113..124
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 145..156
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 176..187
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 214..225
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 227..238
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 240..251
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 253..264
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 266..277
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 279..290
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 292..303
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 365..376

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

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

            it("should extract conditional expression", function () {
                testEditor.setSelection({line: 44, ch: 4}, {line: 44, ch: 19});

                var prevDocLength = testDoc.getText().length;

Severity: Major
Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 12 other locations - About 4 hrs to fix
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 100..111
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 113..124
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 145..156
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 176..187
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 189..200
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 214..225
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 240..251
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 253..264
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 266..277
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 279..290
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 292..303
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 365..376

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

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

            it("should extract array expression", function () {
                testEditor.setSelection({line: 14, ch: 4}, {line: 14, ch: 13});

                var prevDocLength = testDoc.getText().length;

Severity: Major
Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 12 other locations - About 4 hrs to fix
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 100..111
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 145..156
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 176..187
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 189..200
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 214..225
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 227..238
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 240..251
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 253..264
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 266..277
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 279..290
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 292..303
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 365..376

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

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

            it("should extract arrow function", function () {
                testEditor.setSelection({line: 56, ch: 4}, {line: 56, ch: 16});

                var prevDocLength = testDoc.getText().length;

Severity: Major
Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 12 other locations - About 4 hrs to fix
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 100..111
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 113..124
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 145..156
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 176..187
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 189..200
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 214..225
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 227..238
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 240..251
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 266..277
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 279..290
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 292..303
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 365..376

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

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

            it("should create variable with unique name", function() {
                testEditor.setSelection({line: 126, ch: 12}, {line: 126, ch: 14});

                var prevDocLength = testDoc.getText().length;

Severity: Major
Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 12 other locations - About 4 hrs to fix
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 100..111
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 113..124
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 145..156
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 176..187
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 189..200
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 214..225
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 227..238
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 240..251
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 253..264
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 266..277
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 279..290
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 292..303

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

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

            it("should extract unary expression", function () {
                testEditor.setSelection({line: 31, ch: 4}, {line: 31, ch: 7});

                var prevDocLength = testDoc.getText().length;

Severity: Major
Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 12 other locations - About 4 hrs to fix
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 100..111
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 113..124
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 145..156
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 189..200
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 214..225
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 227..238
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 240..251
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 253..264
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 266..277
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 279..290
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 292..303
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 365..376

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                if (c === ">") {
                    this._emitToken("attribvalue");
                    this._emitSpecialToken("opentagend", this._index + 1, _clonePos(this._indexPos, 1));
                    this._state = TEXT;
                    this._startSection(1);
Severity: Major
Found in src/language/HTMLTokenizer.js and 1 other location - About 4 hrs to fix
src/language/HTMLTokenizer.js on lines 227..238

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

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

                } else if (c === ">") {
                    this._emitToken("opentagname");
                    this._emitSpecialToken("opentagend", this._index + 1, _clonePos(this._indexPos, 1));
                    this._state = TEXT;
                    this._startSection(1);
Severity: Major
Found in src/language/HTMLTokenizer.js and 1 other location - About 4 hrs to fix
src/language/HTMLTokenizer.js on lines 360..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 134.

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 _cmdInstall has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
Open

function _cmdInstall(packagePath, destinationDirectory, options, callback, pCallback, _doUpdate) {
    if (!options || !options.disabledDirectory || !options.apiVersion || !options.systemExtensionDirectory) {
        callback(new Error(Errors.MISSING_REQUIRED_OPTIONS), null);
        return;
    }
Severity: Minor
Found in src/extensibility/node/ExtensionManagerDomain.js - About 4 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

File AutoUpdateDomain.js has 367 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright (c) 2018 - 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: Minor
Found in src/extensions/default/AutoUpdate/node/AutoUpdateDomain.js - About 4 hrs to fix

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

        simulate: function( type, elem, event, bubble ) {
            // Piggyback on a donor event to simulate a different one.
            // Fake originalEvent to avoid donor's stopPropagation, but if the
            // simulated event prevents default then we do the same on the donor.
            var e = jQuery.extend(
    Severity: Major
    Found in src/thirdparty/jquery-2.1.3.js and 1 other location - About 4 hrs to fix
    src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 3474..3494

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

    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

        simulate: function( type, elem, event, bubble ) {
            // Piggyback on a donor event to simulate a different one.
            // Fake originalEvent to avoid donor's stopPropagation, but if the
            // simulated event prevents default then we do the same on the donor.
            var e = jQuery.extend(
    src/thirdparty/jquery-2.1.3.js on lines 4633..4654

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

    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

        LanguageClientWrapper.prototype.requestHints = function (params) {
            return this._request(ToolingInfo.FEATURES.CODE_HINTS, params)
                .then(function(response) {
                    if(response && response.items && response.items.length) {
                        logAnalyticsData("CODE_HINTS");
    Severity: Major
    Found in src/languageTools/LanguageClientWrapper.js and 1 other location - About 4 hrs to fix
    src/languageTools/LanguageClientWrapper.js on lines 378..388

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

    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

                } else {
                    toClose = true;
                    dialogId = DefaultDialogs.DIALOG_ID_EXT_DELETED;
                    message = StringUtils.format(
                        Strings.EXT_DELETED_MESSAGE,
    Severity: Major
    Found in src/project/FileSyncManager.js and 1 other location - About 4 hrs to fix
    src/project/FileSyncManager.js on lines 302..324

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

                if (i < editConflicts.length) {
                    toClose = false;
                    dialogId = DefaultDialogs.DIALOG_ID_EXT_CHANGED;
                    message = StringUtils.format(
                        Strings.EXT_MODIFIED_MESSAGE,
    Severity: Major
    Found in src/project/FileSyncManager.js and 1 other location - About 4 hrs to fix
    src/project/FileSyncManager.js on lines 324..345

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

    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

        LanguageClientWrapper.prototype.requestParameterHints = function (params) {
            return this._request(ToolingInfo.FEATURES.PARAMETER_HINTS, params)
                .then(function(response) {
                    if (response && response.signatures && response.signatures.length) {
                        logAnalyticsData("PARAM_HINTS");
    Severity: Major
    Found in src/languageTools/LanguageClientWrapper.js and 1 other location - About 4 hrs to fix
    src/languageTools/LanguageClientWrapper.js on lines 360..370

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

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

                it("should insert value to left in a multiple options attribute", function () {
                    // Between "" in transform="" inside <g>
                    testDocument.replaceRange("<rect transform=\"\"", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 25});
                    selectHint(SVGCodeHints.hintProvider, "matrix()");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
    src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
    src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
    src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
    src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
    src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
    src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
    src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
    src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
    src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
    src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

                it("should insert if first character is typed after ='", function () {
                    // After clip-path='i inside <g>
                    testDocument.replaceRange("<defs clip-path='i", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 26});
                    selectHint(SVGCodeHints.hintProvider, "inherit");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
    src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
    src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
    src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
    src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
    src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
    src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
    src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
    src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
    src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
    src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

                it("should insert if first character is typed after =\"", function () {
                    // After clip-path="i inside <g>
                    testDocument.replaceRange("<defs clip-path=\"i", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 26});
                    selectHint(SVGCodeHints.hintProvider, "inherit");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
    src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
    src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
    src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
    src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
    src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
    src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
    src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
    src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
    src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
    src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

    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