yoctore/yocto-express

View on GitHub

Showing 28 of 56 total issues

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

  if (!this.isReady()) {
    // Error message
    this.logger.error([ '[ Express.processSession ] -',
      'Cannot process config. App is not ready.' ].join(' '));

Severity: Major
Found in src/index.js and 15 other locations - About 1 hr to fix
src/index.js on lines 217..224
src/index.js on lines 247..254
src/index.js on lines 277..284
src/index.js on lines 310..317
src/index.js on lines 339..346
src/index.js on lines 386..393
src/index.js on lines 443..450
src/index.js on lines 474..481
src/index.js on lines 507..514
src/index.js on lines 545..552
src/index.js on lines 697..704
src/index.js on lines 730..737
src/index.js on lines 780..787
src/index.js on lines 992..999
src/index.js on lines 1044..1051

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

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

  if (!this.isReady()) {
    // Error message
    this.logger.error([ '[ Express.processStackError ] -',
      'Cannot process config. App is not ready.' ].join(' '));

Severity: Major
Found in src/index.js and 15 other locations - About 1 hr to fix
src/index.js on lines 247..254
src/index.js on lines 277..284
src/index.js on lines 310..317
src/index.js on lines 339..346
src/index.js on lines 386..393
src/index.js on lines 443..450
src/index.js on lines 474..481
src/index.js on lines 507..514
src/index.js on lines 545..552
src/index.js on lines 574..581
src/index.js on lines 697..704
src/index.js on lines 730..737
src/index.js on lines 780..787
src/index.js on lines 992..999
src/index.js on lines 1044..1051

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

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

  if (!this.isReady()) {
    // Error message
    this.logger.error([ '[ Express.processPrettyHTML ] -',
      'Cannot process config. App is not ready.' ].join(' '));

Severity: Major
Found in src/index.js and 15 other locations - About 1 hr to fix
src/index.js on lines 217..224
src/index.js on lines 277..284
src/index.js on lines 310..317
src/index.js on lines 339..346
src/index.js on lines 386..393
src/index.js on lines 443..450
src/index.js on lines 474..481
src/index.js on lines 507..514
src/index.js on lines 545..552
src/index.js on lines 574..581
src/index.js on lines 697..704
src/index.js on lines 730..737
src/index.js on lines 780..787
src/index.js on lines 992..999
src/index.js on lines 1044..1051

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

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

  if (!this.isReady()) {
    // Error message
    this.logger.error([ '[ Express.processMultipart ] -',
      'Cannot process config. App is not ready.' ].join(' '));

Severity: Major
Found in src/index.js and 15 other locations - About 1 hr to fix
src/index.js on lines 217..224
src/index.js on lines 247..254
src/index.js on lines 277..284
src/index.js on lines 310..317
src/index.js on lines 339..346
src/index.js on lines 386..393
src/index.js on lines 443..450
src/index.js on lines 474..481
src/index.js on lines 507..514
src/index.js on lines 545..552
src/index.js on lines 574..581
src/index.js on lines 730..737
src/index.js on lines 780..787
src/index.js on lines 992..999
src/index.js on lines 1044..1051

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

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

  if (!this.isReady()) {
    // Error message
    this.logger.error([ '[ Express.processBodyParser ] -',
      'Cannot process config. App is not ready.' ].join(' '));

Severity: Major
Found in src/index.js and 15 other locations - About 1 hr to fix
src/index.js on lines 217..224
src/index.js on lines 247..254
src/index.js on lines 277..284
src/index.js on lines 310..317
src/index.js on lines 339..346
src/index.js on lines 386..393
src/index.js on lines 443..450
src/index.js on lines 474..481
src/index.js on lines 545..552
src/index.js on lines 574..581
src/index.js on lines 697..704
src/index.js on lines 730..737
src/index.js on lines 780..787
src/index.js on lines 992..999
src/index.js on lines 1044..1051

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

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

  if (!this.isReady()) {
    // Error message
    this.logger.error([ '[ Express.processPrerender ] -',
      'Cannot process config. App is not ready.' ].join(' '));

Severity: Major
Found in src/index.js and 15 other locations - About 1 hr to fix
src/index.js on lines 217..224
src/index.js on lines 247..254
src/index.js on lines 277..284
src/index.js on lines 310..317
src/index.js on lines 339..346
src/index.js on lines 386..393
src/index.js on lines 443..450
src/index.js on lines 474..481
src/index.js on lines 507..514
src/index.js on lines 545..552
src/index.js on lines 574..581
src/index.js on lines 697..704
src/index.js on lines 730..737
src/index.js on lines 992..999
src/index.js on lines 1044..1051

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

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

      certPath = !path.isAbsolute(certPath) ? path.normalize([ process.cwd(), certPath ].join('/')) :
        certPath;
Severity: Minor
Found in src/index.js and 1 other location - About 40 mins to fix
src/index.js on lines 176..177

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

      keyPath = !path.isAbsolute(keyPath) ? path.normalize([ process.cwd(), keyPath ].join('/')) :
        keyPath;
Severity: Minor
Found in src/index.js and 1 other location - About 40 mins to fix
src/index.js on lines 178..179

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

Severity
Category
Status
Source
Language