FreeAllMedia/akiro

View on GitHub
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.config.spec.js

Summary

Maintainability
D
2 days
Test Coverage

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

    describe("akiroBuilder.temp", () => {
        it("should be set to context.temp if provided", () => {
            akiroBuilder.temp.should.eql(mockTemp);
        });

es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.config.spec.js on lines 123..133
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.config.spec.js on lines 135..145
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.config.spec.js on lines 147..157

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

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

    describe("akiroBuilder.fileSystem", () => {
        it("should be set to context.fileSystem if provided", () => {
            akiroBuilder.fileSystem.should.eql(mockFileSystem);
        });

es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.config.spec.js on lines 99..109
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.config.spec.js on lines 123..133
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.config.spec.js on lines 135..145

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

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

    describe("akiroBuilder.exec", () => {
        it("should be set to context.exec if provided", () => {
            akiroBuilder.exec.should.eql(mockExec);
        });

es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.config.spec.js on lines 99..109
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.config.spec.js on lines 135..145
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.config.spec.js on lines 147..157

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

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

    describe("akiroBuilder.AWS", () => {
        it("should be set to context.AWS if provided", () => {
            akiroBuilder.AWS.should.eql(mockAWS);
        });

es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.config.spec.js on lines 99..109
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.config.spec.js on lines 123..133
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.config.spec.js on lines 147..157

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

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

        mockExec = createMockExec({
            [`cd ${temporaryDirectoryPath};node ${mockNpmPath} install`]: execDone => execDone(),
            [`cd ${temporaryDirectoryPath};node ${mockNpmPath} init -y`]: execDone => {
                fileSystem.copySync(`${__dirname}/../../../fixtures/newPackage.json`, `${temporaryDirectoryPath}/package.json`);
                execDone();
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.addDependencies.spec.js on lines 51..57
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.createPackageZip.spec.js on lines 53..59
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.succeed.spec.js on lines 52..58

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

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

        context = {
            AWS: mockAWS,
            exec: mockExec,
            npmPath: mockNpmPath,
            temp: mockTemp,
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.writeToLocal.spec.js on lines 89..97

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

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

    beforeEach((done) => {
        temp.mkdir("akiroBuilder", (error, newTemporaryDirectoryPath) => {
            temporaryDirectoryPath = newTemporaryDirectoryPath;
            done();
        });
es6/spec/akiro/akiro.initialize.spec.js on lines 30..35
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.addDependencies.spec.js on lines 28..33
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.copyToS3.spec.js on lines 28..33
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.createPackageZip.spec.js on lines 28..33
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.generatePackageJson.spec.js on lines 28..33
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.installPackage.spec.js on lines 28..33
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.makeTemporaryDirectory.spec.js on lines 28..33
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.succeed.spec.js on lines 28..33
es6/spec/builders/nodejs/akiroBuilder/akiroBuilder.writeToLocal.spec.js on lines 30..35

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

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

There are no issues that match your filters.

Category
Status