brianneisler/gulp-recipe

View on GitHub

Showing 17 of 20 total issues

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

ConfigDeleteCommand.getInstance = function() {
    if (ConfigDeleteCommand.instance === null) {
        ConfigDeleteCommand.instance = new ConfigDeleteCommand();
    }
    return ConfigDeleteCommand.instance;
Severity: Major
Found in src/js/commands/ConfigDeleteCommand.js and 8 other locations - About 1 hr to fix
src/js/GulpRecipe.js on lines 232..237
src/js/commands/ConfigGetCommand.js on lines 83..88
src/js/commands/ConfigSetCommand.js on lines 92..97
src/js/commands/InstallCommand.js on lines 94..99
src/js/commands/LoginCommand.js on lines 133..138
src/js/commands/LogoutCommand.js on lines 98..103
src/js/commands/PublishCommand.js on lines 94..99
src/js/commands/SignupCommand.js on lines 143..148

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

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

GulpRecipe.getInstance = function() {
    if (GulpRecipe.instance === null) {
        GulpRecipe.instance = new GulpRecipe();
    }
    return GulpRecipe.instance;
Severity: Major
Found in src/js/GulpRecipe.js and 8 other locations - About 1 hr to fix
src/js/commands/ConfigDeleteCommand.js on lines 89..94
src/js/commands/ConfigGetCommand.js on lines 83..88
src/js/commands/ConfigSetCommand.js on lines 92..97
src/js/commands/InstallCommand.js on lines 94..99
src/js/commands/LoginCommand.js on lines 133..138
src/js/commands/LogoutCommand.js on lines 98..103
src/js/commands/PublishCommand.js on lines 94..99
src/js/commands/SignupCommand.js on lines 143..148

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

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

InstallCommand.getInstance = function() {
    if (InstallCommand.instance === null) {
        InstallCommand.instance = new InstallCommand();
    }
    return InstallCommand.instance;
Severity: Major
Found in src/js/commands/InstallCommand.js and 8 other locations - About 1 hr to fix
src/js/GulpRecipe.js on lines 232..237
src/js/commands/ConfigDeleteCommand.js on lines 89..94
src/js/commands/ConfigGetCommand.js on lines 83..88
src/js/commands/ConfigSetCommand.js on lines 92..97
src/js/commands/LoginCommand.js on lines 133..138
src/js/commands/LogoutCommand.js on lines 98..103
src/js/commands/PublishCommand.js on lines 94..99
src/js/commands/SignupCommand.js on lines 143..148

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

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

PublishCommand.getInstance = function() {
    if (PublishCommand.instance === null) {
        PublishCommand.instance = new PublishCommand();
    }
    return PublishCommand.instance;
Severity: Major
Found in src/js/commands/PublishCommand.js and 8 other locations - About 1 hr to fix
src/js/GulpRecipe.js on lines 232..237
src/js/commands/ConfigDeleteCommand.js on lines 89..94
src/js/commands/ConfigGetCommand.js on lines 83..88
src/js/commands/ConfigSetCommand.js on lines 92..97
src/js/commands/InstallCommand.js on lines 94..99
src/js/commands/LoginCommand.js on lines 133..138
src/js/commands/LogoutCommand.js on lines 98..103
src/js/commands/SignupCommand.js on lines 143..148

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

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

SignupCommand.getInstance = function() {
    if (SignupCommand.instance === null) {
        SignupCommand.instance = new SignupCommand();
    }
    return SignupCommand.instance;
Severity: Major
Found in src/js/commands/SignupCommand.js and 8 other locations - About 1 hr to fix
src/js/GulpRecipe.js on lines 232..237
src/js/commands/ConfigDeleteCommand.js on lines 89..94
src/js/commands/ConfigGetCommand.js on lines 83..88
src/js/commands/ConfigSetCommand.js on lines 92..97
src/js/commands/InstallCommand.js on lines 94..99
src/js/commands/LoginCommand.js on lines 133..138
src/js/commands/LogoutCommand.js on lines 98..103
src/js/commands/PublishCommand.js on lines 94..99

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

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

LoginCommand.getInstance = function() {
    if (LoginCommand.instance === null) {
        LoginCommand.instance = new LoginCommand();
    }
    return LoginCommand.instance;
Severity: Major
Found in src/js/commands/LoginCommand.js and 8 other locations - About 1 hr to fix
src/js/GulpRecipe.js on lines 232..237
src/js/commands/ConfigDeleteCommand.js on lines 89..94
src/js/commands/ConfigGetCommand.js on lines 83..88
src/js/commands/ConfigSetCommand.js on lines 92..97
src/js/commands/InstallCommand.js on lines 94..99
src/js/commands/LogoutCommand.js on lines 98..103
src/js/commands/PublishCommand.js on lines 94..99
src/js/commands/SignupCommand.js on lines 143..148

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

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

LogoutCommand.getInstance = function() {
    if (LogoutCommand.instance === null) {
        LogoutCommand.instance = new LogoutCommand();
    }
    return LogoutCommand.instance;
Severity: Major
Found in src/js/commands/LogoutCommand.js and 8 other locations - About 1 hr to fix
src/js/GulpRecipe.js on lines 232..237
src/js/commands/ConfigDeleteCommand.js on lines 89..94
src/js/commands/ConfigGetCommand.js on lines 83..88
src/js/commands/ConfigSetCommand.js on lines 92..97
src/js/commands/InstallCommand.js on lines 94..99
src/js/commands/LoginCommand.js on lines 133..138
src/js/commands/PublishCommand.js on lines 94..99
src/js/commands/SignupCommand.js on lines 143..148

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

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

ConfigGetCommand.getInstance = function() {
    if (ConfigGetCommand.instance === null) {
        ConfigGetCommand.instance = new ConfigGetCommand();
    }
    return ConfigGetCommand.instance;
Severity: Major
Found in src/js/commands/ConfigGetCommand.js and 8 other locations - About 1 hr to fix
src/js/GulpRecipe.js on lines 232..237
src/js/commands/ConfigDeleteCommand.js on lines 89..94
src/js/commands/ConfigSetCommand.js on lines 92..97
src/js/commands/InstallCommand.js on lines 94..99
src/js/commands/LoginCommand.js on lines 133..138
src/js/commands/LogoutCommand.js on lines 98..103
src/js/commands/PublishCommand.js on lines 94..99
src/js/commands/SignupCommand.js on lines 143..148

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

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

ConfigSetCommand.getInstance = function() {
    if (ConfigSetCommand.instance === null) {
        ConfigSetCommand.instance = new ConfigSetCommand();
    }
    return ConfigSetCommand.instance;
Severity: Major
Found in src/js/commands/ConfigSetCommand.js and 8 other locations - About 1 hr to fix
src/js/GulpRecipe.js on lines 232..237
src/js/commands/ConfigDeleteCommand.js on lines 89..94
src/js/commands/ConfigGetCommand.js on lines 83..88
src/js/commands/InstallCommand.js on lines 94..99
src/js/commands/LoginCommand.js on lines 133..138
src/js/commands/LogoutCommand.js on lines 98..103
src/js/commands/PublishCommand.js on lines 94..99
src/js/commands/SignupCommand.js on lines 143..148

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

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

    async get(recipeQuery, options) {
        const pack = await this.bitPack.get(PACK_TYPE, PACK_CLASS, DEFAULT_PACK_SCOPE, recipeQuery, options);
        return this.recipeStore.generateRecipe(pack);
    },
Severity: Minor
Found in src/js/GulpRecipe.js and 1 other location - About 50 mins to fix
src/js/GulpRecipe.js on lines 133..136

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 52.

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

    async install(recipeQuery, options) {
        const pack = await this.bitPack.install(PACK_TYPE, PACK_CLASS, DEFAULT_PACK_SCOPE, recipeQuery, options);
        return this.recipeStore.generateRecipe(pack);
    },
Severity: Minor
Found in src/js/GulpRecipe.js and 1 other location - About 50 mins to fix
src/js/GulpRecipe.js on lines 121..124

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

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

        try {
            options = this.refineTargetOption(options, 'project');
            const publishKeyEntity = await GulpRecipe.publish(recipePath, options);
            console.log('Recipe published ' + publishKeyEntity.getPackName() + '@' + publishKeyEntity.getPackVersionNumber());
        } catch(error) {
Severity: Major
Found in src/js/commands/PublishCommand.js and 3 other locations - About 40 mins to fix
src/js/commands/InstallCommand.js on lines 60..69
src/js/commands/LogoutCommand.js on lines 64..73
src/js/commands/SignupCommand.js on lines 64..93

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

        try {
            options = this.refineTargetOption(options, 'project');
            const installedRecipe = await GulpRecipe.install(recipeQuery, options);
            console.log(installedRecipe.getScope() + ' ' + installedRecipe.getPackClass() +  '-recipe installed ' + installedRecipe.getName() + '@' + installedRecipe.getVersion());
        } catch(error) {
Severity: Major
Found in src/js/commands/InstallCommand.js and 3 other locations - About 40 mins to fix
src/js/commands/LogoutCommand.js on lines 64..73
src/js/commands/PublishCommand.js on lines 60..69
src/js/commands/SignupCommand.js on lines 64..93

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

        try {
            options = this.refineTargetOption(options, 'user');
            const schema = {
                properties: {
                    username: {
Severity: Major
Found in src/js/commands/SignupCommand.js and 3 other locations - About 40 mins to fix
src/js/commands/InstallCommand.js on lines 60..69
src/js/commands/LogoutCommand.js on lines 64..73
src/js/commands/PublishCommand.js on lines 60..69

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

        try {
            options = this.refineTargetOption(options, 'user');
            await GulpRecipe.logout(options);
            console.log('You are now logged out.');
        } catch(error) {
Severity: Major
Found in src/js/commands/LogoutCommand.js and 3 other locations - About 40 mins to fix
src/js/commands/InstallCommand.js on lines 60..69
src/js/commands/PublishCommand.js on lines 60..69
src/js/commands/SignupCommand.js on lines 64..93

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

    _constructor() {

        this._super();


Severity: Minor
Found in src/js/stores/RecipeStore.js and 1 other location - About 35 mins to fix
src/js/caches/RecipeCache.js on lines 32..46

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

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

    _constructor() {

        this._super();


Severity: Minor
Found in src/js/caches/RecipeCache.js and 1 other location - About 35 mins to fix
src/js/stores/RecipeStore.js on lines 37..51

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

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