yahoo/kobold-core

View on GitHub

Showing 29 of 36 total issues

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

var BlinkDiffAdapter = ComparisonAdapter.extend(

    /** @lends BlinkDiffAdapter.prototype */
    {
        /**
Severity: Major
Found in lib/comparisonAdapter/blinkDiffAdapter.js and 1 other location - About 1 day to fix
lib/comparisonAdapter/perceptualDiffAdapter.js on lines 15..94

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

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

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

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

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

Refactorings

Further Reading

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

var PerceptualDiffAdapter = ComparisonAdapter.extend(

    /** @lends PerceptualDiffAdapter.prototype */
    {
        /**
Severity: Major
Found in lib/comparisonAdapter/perceptualDiffAdapter.js and 1 other location - About 1 day to fix
lib/comparisonAdapter/blinkDiffAdapter.js on lines 15..94

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

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

        _prepareDepartmentBucket: function () {
            var id = 'department_' + uuid.v4();
            return this._prepareBucket('departments', this._department, {
                id: id
            }).then(function () {
Severity: Major
Found in lib/storageAdapter/keyValueStorageAdapter.js and 2 other locations - About 4 hrs to fix
lib/storageAdapter/keyValueStorageAdapter.js on lines 102..111
lib/storageAdapter/keyValueStorageAdapter.js on lines 138..147

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

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

        _prepareCompanyBucket: function () {
            var id = 'company_' + uuid.v4();
            return this._prepareBucket('companies', this._company, {
                id: id
            }).then(function () {
Severity: Major
Found in lib/storageAdapter/keyValueStorageAdapter.js and 2 other locations - About 4 hrs to fix
lib/storageAdapter/keyValueStorageAdapter.js on lines 120..129
lib/storageAdapter/keyValueStorageAdapter.js on lines 138..147

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

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

        _prepareProjectBucket: function () {
            var id = 'project_' + uuid.v4();
            return this._prepareBucket('projects', this._project, {
                id: id
            }).then(function () {
Severity: Major
Found in lib/storageAdapter/keyValueStorageAdapter.js and 2 other locations - About 4 hrs to fix
lib/storageAdapter/keyValueStorageAdapter.js on lines 102..111
lib/storageAdapter/keyValueStorageAdapter.js on lines 120..129

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

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

        archiveApprovedScreen: function (name, image) {
            return this.getPromise().then(function () {
                return this._blobImage(image);
            }.bind(this)).then(function (blob) {
                return this._connection.setObject(this._getApprovedScreenBucket(), name, blob, 'image/png');
Severity: Major
Found in lib/storageAdapter/keyValueStorageAdapter.js and 3 other locations - About 3 hrs to fix
lib/storageAdapter/keyValueStorageAdapter.js on lines 326..332
lib/storageAdapter/keyValueStorageAdapter.js on lines 414..420
lib/storageAdapter/keyValueStorageAdapter.js on lines 458..464

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

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

        archiveBuildScreen: function (name, image) {
            return this.getPromise().then(function () {
                return this._blobImage(image);
            }.bind(this)).then(function (blob) {
                return this._connection.setObject(this._getBuildScreenBucket(), name, blob, 'image/png');
Severity: Major
Found in lib/storageAdapter/keyValueStorageAdapter.js and 3 other locations - About 3 hrs to fix
lib/storageAdapter/keyValueStorageAdapter.js on lines 326..332
lib/storageAdapter/keyValueStorageAdapter.js on lines 370..376
lib/storageAdapter/keyValueStorageAdapter.js on lines 458..464

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

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

        archiveCurrentApprovedScreen: function (name, image) {
            return this.getPromise().then(function () {
                return this._blobImage(image);
            }.bind(this)).then(function (blob) {
                return this._connection.setObject(this._getCurrentApprovedScreenBucket(), name, blob, 'image/png');
Severity: Major
Found in lib/storageAdapter/keyValueStorageAdapter.js and 3 other locations - About 3 hrs to fix
lib/storageAdapter/keyValueStorageAdapter.js on lines 370..376
lib/storageAdapter/keyValueStorageAdapter.js on lines 414..420
lib/storageAdapter/keyValueStorageAdapter.js on lines 458..464

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

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

        archiveHighlightScreen: function (name, image) {
            return this.getPromise().then(function () {
                return this._blobImage(image);
            }.bind(this)).then(function (blob) {
                return this._connection.setObject(this._getHighlightScreenBucket(), name, blob, 'image/png');
Severity: Major
Found in lib/storageAdapter/keyValueStorageAdapter.js and 3 other locations - About 3 hrs to fix
lib/storageAdapter/keyValueStorageAdapter.js on lines 326..332
lib/storageAdapter/keyValueStorageAdapter.js on lines 370..376
lib/storageAdapter/keyValueStorageAdapter.js on lines 414..420

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

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

        getHighlightScreen: function (name) {
            return this.getPromise().then(function () {
                return this._connection.getObject(this._getHighlightScreenBucket(), name);
            }.bind(this)).then(function (blob) {
                return this._loadImage(blob);
Severity: Major
Found in lib/storageAdapter/keyValueStorageAdapter.js and 3 other locations - About 2 hrs to fix
lib/storageAdapter/keyValueStorageAdapter.js on lines 310..316
lib/storageAdapter/keyValueStorageAdapter.js on lines 354..360
lib/storageAdapter/keyValueStorageAdapter.js on lines 398..404

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

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

        getApprovedScreen: function (name) {
            return this.getPromise().then(function () {
                return this._connection.getObject(this._getApprovedScreenBucket(), name);
            }.bind(this)).then(function (blob) {
                return this._loadImage(blob);
Severity: Major
Found in lib/storageAdapter/keyValueStorageAdapter.js and 3 other locations - About 2 hrs to fix
lib/storageAdapter/keyValueStorageAdapter.js on lines 310..316
lib/storageAdapter/keyValueStorageAdapter.js on lines 398..404
lib/storageAdapter/keyValueStorageAdapter.js on lines 442..448

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

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

        getCurrentApprovedScreen: function (name) {
            return this.getPromise().then(function () {
                return this._connection.getObject(this._getCurrentApprovedScreenBucket(), name);
            }.bind(this)).then(function (blob) {
                return this._loadImage(blob);
Severity: Major
Found in lib/storageAdapter/keyValueStorageAdapter.js and 3 other locations - About 2 hrs to fix
lib/storageAdapter/keyValueStorageAdapter.js on lines 354..360
lib/storageAdapter/keyValueStorageAdapter.js on lines 398..404
lib/storageAdapter/keyValueStorageAdapter.js on lines 442..448

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

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

        getBuildScreen: function (name) {
            return this.getPromise().then(function () {
                return this._connection.getObject(this._getBuildScreenBucket(), name);
            }.bind(this)).then(function (blob) {
                return this._loadImage(blob);
Severity: Major
Found in lib/storageAdapter/keyValueStorageAdapter.js and 3 other locations - About 2 hrs to fix
lib/storageAdapter/keyValueStorageAdapter.js on lines 310..316
lib/storageAdapter/keyValueStorageAdapter.js on lines 354..360
lib/storageAdapter/keyValueStorageAdapter.js on lines 442..448

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

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

}, {
    /**
     * Lists the names of items
     *
     * @param {ConnectionAdapter} connection
Severity: Major
Found in lib/keyValueModels/department.js and 1 other location - About 2 hrs to fix
lib/keyValueModels/company.js on lines 50..80

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

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

}, {
    /**
     * Lists the names of items
     *
     * @param {ConnectionAdapter} connection
Severity: Major
Found in lib/keyValueModels/company.js and 1 other location - About 2 hrs to fix
lib/keyValueModels/department.js on lines 30..60

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

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

        getHighlightScreen: function (name) {
            return this.getPromise().then(function () {
                return this._readImage(path.join(this._getHighlightPath(), name + '.png'));
            }.bind(this));
        },
Severity: Major
Found in lib/storageAdapter/fileStorageAdapter.js and 2 other locations - About 2 hrs to fix
lib/storageAdapter/fileStorageAdapter.js on lines 275..279
lib/storageAdapter/fileStorageAdapter.js on lines 354..358

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

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

        getCurrentApprovedScreen: function (name) {
            return this.getPromise().then(function () {
                return this._readImage(path.join(this._getApprovedPath(), name + '.png'));
            }.bind(this));
        },
Severity: Major
Found in lib/storageAdapter/fileStorageAdapter.js and 2 other locations - About 2 hrs to fix
lib/storageAdapter/fileStorageAdapter.js on lines 354..358
lib/storageAdapter/fileStorageAdapter.js on lines 394..398

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

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

        getBuildScreen: function (name) {
            return this.getPromise().then(function () {
                return this._readImage(path.join(this._getBuildPath(), name + '.png'));
            }.bind(this));
        },
Severity: Major
Found in lib/storageAdapter/fileStorageAdapter.js and 2 other locations - About 2 hrs to fix
lib/storageAdapter/fileStorageAdapter.js on lines 275..279
lib/storageAdapter/fileStorageAdapter.js on lines 394..398

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

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

        getBuildScreenNames: function () {
            return this.getPromise().then(function () {
                return this._connection.getBucketKeys(this._getBuildScreenBucket());
            }.bind(this));
        },
Severity: Major
Found in lib/storageAdapter/keyValueStorageAdapter.js and 3 other locations - About 1 hr to fix
lib/storageAdapter/keyValueStorageAdapter.js on lines 297..301
lib/storageAdapter/keyValueStorageAdapter.js on lines 341..345
lib/storageAdapter/keyValueStorageAdapter.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 65.

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

        getCurrentApprovedScreenNames: function () {
            return this.getPromise().then(function () {
                return this._connection.getBucketKeys(this._getCurrentApprovedScreenBucket());
            }.bind(this));
        },
Severity: Major
Found in lib/storageAdapter/keyValueStorageAdapter.js and 3 other locations - About 1 hr to fix
lib/storageAdapter/keyValueStorageAdapter.js on lines 341..345
lib/storageAdapter/keyValueStorageAdapter.js on lines 385..389
lib/storageAdapter/keyValueStorageAdapter.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 65.

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