danielwippermann/resol-vbus

View on GitHub

Showing 557 of 557 total issues

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

        this.unitFamilyByCode = unitFamilies.reduce((memo, unitFamily) => {
            memo [unitFamily.unitFamilyCode] = unitFamily;
            return memo;
        }, {});
Severity: Major
Found in src/specification-file.js and 5 other locations - About 35 mins to fix
src/specification-file.js on lines 119..122
src/specification-file.js on lines 124..127
src/specification-file.js on lines 131..134
src/specification-file.js on lines 143..146
src/specification-file.js on lines 148..151

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

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

        this.unitFamilyById = unitFamilies.reduce((memo, unitFamily) => {
            memo [unitFamily.unitFamilyId] = unitFamily;
            return memo;
        }, {});
Severity: Major
Found in src/specification-file.js and 5 other locations - About 35 mins to fix
src/specification-file.js on lines 119..122
src/specification-file.js on lines 124..127
src/specification-file.js on lines 136..139
src/specification-file.js on lines 143..146
src/specification-file.js on lines 148..151

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

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

        this.typeByCode = types.reduce((memo, type) => {
            memo [type.typeCode] = type;
            return memo;
        }, {});
Severity: Major
Found in src/specification-file.js and 5 other locations - About 35 mins to fix
src/specification-file.js on lines 119..122
src/specification-file.js on lines 131..134
src/specification-file.js on lines 136..139
src/specification-file.js on lines 143..146
src/specification-file.js on lines 148..151

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

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

        this.knownUnitsById = knownUnits.reduce((memo, unit) => {
            memo [unit.unitId] = unit;
            return memo;
        }, {});
Severity: Major
Found in src/specification-file.js and 5 other locations - About 35 mins to fix
src/specification-file.js on lines 119..122
src/specification-file.js on lines 124..127
src/specification-file.js on lines 131..134
src/specification-file.js on lines 136..139
src/specification-file.js on lines 148..151

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

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 (!this.specification) {
            this.specification = new Specification({
                language: (options && options.language) || 'en'
            });
        }
Severity: Minor
Found in src/dlx-json-converter.js and 1 other location - About 35 mins to fix
src/text-converter.js on lines 73..77

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

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

    convertHeader(header) {
        if (this.objectMode) {
            this.push(header);
        } else {
            throw new Error('Must be implemented by sub-class');
Severity: Minor
Found in src/converter.js and 1 other location - About 35 mins to fix
src/converter.js on lines 93..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 46.

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

    convertRawData(rawData) {
        if (this.objectMode) {
            this.push(rawData);
        } else {
            throw new Error('Must be implemented by sub-class');
Severity: Minor
Found in src/converter.js and 1 other location - About 35 mins to fix
src/converter.js on lines 121..127

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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 (!this.specification) {
            this.specification = new Specification({
                language: (options && options.language) || 'en'
            });
        }
Severity: Minor
Found in src/text-converter.js and 1 other location - About 35 mins to fix
src/dlx-json-converter.js on lines 47..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 46.

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

        value.lt(90, () => {
            $(/^Solar_Sp5_.*/).ignore();
            $(/^Solar_Wf5_(ExtWT)_.*/).ignore();
        });
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 41..44
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 50..53
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 59..62
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 63..66
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 41..44
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 54..57
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 63..66
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 67..70
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 33..36
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 42..45

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

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

        value.lt(50, () => {
            $(/^Solar_Sp3_.*/).ignore();
            $(/^Solar_Wf3_(ExtWT)_.*/).ignore();
        });
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 41..44
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 50..53
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 59..62
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 63..66
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 41..44
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 54..57
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 67..70
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 71..74
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 33..36
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 42..45

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

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

        value.lt(10, () => {
            $(/^Solar_Kol1_.*/).ignore();
            $(/^Solar_Wf1_(Roehrenkollektor|Bypass|Frostschutz)_.*/).ignore();
        });
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 41..44
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 50..53
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 59..62
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 63..66
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 54..57
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 63..66
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 67..70
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 71..74
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 33..36
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 42..45

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

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

        value.lt(10, () => {
            $(/^Solar_Kol1_.*/).ignore();
            $(/^Solar_Wf1_(Roehrenkollektor|Bypass|Frostschutz)_.*/).ignore();
        });
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 41..44
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 50..53
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 59..62
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 63..66
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 41..44
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 54..57
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 63..66
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 67..70
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 71..74
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 42..45

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

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

        value.lt(10, () => {
            $(/^Solar_Kol1_.*/).ignore();
            $(/^Solar_Wf1_(Roehrenkollektor|Bypass|Frostschutz)_.*/).ignore();
        });
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 50..53
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 59..62
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 63..66
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 41..44
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 54..57
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 63..66
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 67..70
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 71..74
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 33..36
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 42..45

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

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

        value.lt(70, () => {
            $(/^Solar_Sp4_.*/).ignore();
            $(/^Solar_Wf4_(ExtWT)_.*/).ignore();
        });
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 41..44
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 50..53
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 59..62
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 41..44
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 54..57
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 63..66
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 67..70
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 71..74
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 33..36
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 42..45

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

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

        value.check(hasSecondKollektor, () => {
            $(/^Solar_Kol2_.*/).ignore();
            $(/^Solar_Wf2_(Roehrenkollektor|Bypass|Frostschutz)_.*/).ignore();
        });
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 45..48
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 37..40

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

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

        value.check(hasSecondKollektor, () => {
            $(/^Solar_Kol2_.*/).ignore();
            $(/^Solar_Wf2_(Roehrenkollektor|Bypass|Frostschutz)_.*/).ignore();
        });
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 45..48
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 45..48

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

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

class StringModel extends BaseModel {

    constructor() {
        super();

Severity: Minor
Found in tools/configuration-importer/models.js and 2 other locations - About 30 mins to fix
tools/configuration-importer/models.js on lines 43..52
tools/configuration-importer/models.js on lines 116..125

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

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

        value.lt(10, () => {
            $(/^Solar_Sp1_.*/).ignore();
            $(/^Solar_Wf1_(ExtWT)_.*/).ignore();
        });
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 41..44
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 50..53
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 59..62
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 63..66
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 41..44
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 54..57
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 63..66
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 67..70
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 71..74
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 33..36

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

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

        value.lt(50, () => {
            $(/^Solar_Sp3_.*/).ignore();
            $(/^Solar_Wf3_(ExtWT)_.*/).ignore();
        });
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 41..44
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 50..53
src/configuration-optimizers/resol-deltasol-bx-plus-xxx-configuration-optimizer.js on lines 63..66
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 41..44
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 54..57
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 63..66
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 67..70
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 71..74
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 33..36
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 42..45

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

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

        value.check(hasSecondKollektor, () => {
            $(/^Solar_Kol2_.*/).ignore();
            $(/^Solar_Wf2_(Roehrenkollektor|Bypass|Frostschutz)_.*/).ignore();
        });
src/configuration-optimizers/resol-deltasol-mx-112-configuration-optimizer.js on lines 45..48
src/configuration-optimizers/resol-deltasol-slt-102-configuration-optimizer.js on lines 37..40

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

Severity
Category
Status
Source
Language