aurelia/aurelia

View on GitHub

Showing 4,334 of 5,354 total issues

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

  yellow<T extends string>(str: T): T {
    return `\u001b[33m${str}\u001b[39m` as T;
  },
Severity: Major
Found in packages/kernel/src/logger.ts and 7 other locations - About 30 mins to fix
packages/kernel/src/logger.ts on lines 202..204
packages/kernel/src/logger.ts on lines 205..207
packages/kernel/src/logger.ts on lines 211..213
packages/kernel/src/logger.ts on lines 214..216
packages/kernel/src/logger.ts on lines 217..219
packages/kernel/src/logger.ts on lines 220..222
packages/kernel/src/logger.ts on lines 223..225

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

      { instruction: '+a/b+c', parsed: [{ "component": "a", "children": [{ "component": "b" }] }, { "component": "c" }], clean: 'error:siblings' },
Severity: Major
Found in packages/__tests__/src/router/instruction-parser.spec.ts and 9 other locations - About 30 mins to fix
packages/__tests__/src/router/instruction-parser.spec.ts on lines 121..121
packages/__tests__/src/router/instruction-parser.spec.ts on lines 122..122
packages/__tests__/src/router/instruction-parser.spec.ts on lines 130..130
packages/__tests__/src/router/instruction-parser.spec.ts on lines 137..137
packages/__tests__/src/router/instruction-parser.spec.ts on lines 138..138
packages/__tests__/src/router/instruction-parser.spec.ts on lines 163..163
packages/__tests__/src/router/instruction-parser.spec.ts on lines 164..164
packages/__tests__/src/router/instruction-parser.spec.ts on lines 171..171
packages/__tests__/src/router/instruction-parser.spec.ts on lines 172..172

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

      { instruction: '((b/c)+d)', parsed: [{ "component": "b", "children": [{ "component": "c" }] }, { "component": "d" }], clean: 'b/c+d' },
Severity: Major
Found in packages/__tests__/src/router/instruction-parser.spec.ts and 9 other locations - About 30 mins to fix
packages/__tests__/src/router/instruction-parser.spec.ts on lines 121..121
packages/__tests__/src/router/instruction-parser.spec.ts on lines 122..122
packages/__tests__/src/router/instruction-parser.spec.ts on lines 129..129
packages/__tests__/src/router/instruction-parser.spec.ts on lines 130..130
packages/__tests__/src/router/instruction-parser.spec.ts on lines 137..137
packages/__tests__/src/router/instruction-parser.spec.ts on lines 138..138
packages/__tests__/src/router/instruction-parser.spec.ts on lines 163..163
packages/__tests__/src/router/instruction-parser.spec.ts on lines 164..164
packages/__tests__/src/router/instruction-parser.spec.ts on lines 171..171

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

      { instruction: '(b+(c/d))', parsed: [{ "component": "b" }, { "component": "c", "children": [{ "component": "d" }] }], clean: 'b+c/d' },
Severity: Major
Found in packages/__tests__/src/router/instruction-parser.spec.ts and 11 other locations - About 30 mins to fix
packages/__tests__/src/router/instruction-parser.spec.ts on lines 123..123
packages/__tests__/src/router/instruction-parser.spec.ts on lines 124..124
packages/__tests__/src/router/instruction-parser.spec.ts on lines 131..131
packages/__tests__/src/router/instruction-parser.spec.ts on lines 132..132
packages/__tests__/src/router/instruction-parser.spec.ts on lines 139..139
packages/__tests__/src/router/instruction-parser.spec.ts on lines 140..140
packages/__tests__/src/router/instruction-parser.spec.ts on lines 146..146
packages/__tests__/src/router/instruction-parser.spec.ts on lines 152..152
packages/__tests__/src/router/instruction-parser.spec.ts on lines 165..165
packages/__tests__/src/router/instruction-parser.spec.ts on lines 166..166
packages/__tests__/src/router/instruction-parser.spec.ts on lines 173..173

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

  grey<T extends string>(str: T): T {
    return `\u001b[90m${str}\u001b[39m` as T;
  },
Severity: Major
Found in packages/kernel/src/logger.ts and 7 other locations - About 30 mins to fix
packages/kernel/src/logger.ts on lines 202..204
packages/kernel/src/logger.ts on lines 205..207
packages/kernel/src/logger.ts on lines 208..210
packages/kernel/src/logger.ts on lines 211..213
packages/kernel/src/logger.ts on lines 214..216
packages/kernel/src/logger.ts on lines 217..219
packages/kernel/src/logger.ts on lines 220..222

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

      { instruction: 'a/b+c', parsed: [{ "component": "a", "children": [{ "component": "b" }] }, { "component": "c" }], clean: 'a/b+c' },
Severity: Major
Found in packages/__tests__/src/router/instruction-parser.spec.ts and 9 other locations - About 30 mins to fix
packages/__tests__/src/router/instruction-parser.spec.ts on lines 122..122
packages/__tests__/src/router/instruction-parser.spec.ts on lines 129..129
packages/__tests__/src/router/instruction-parser.spec.ts on lines 130..130
packages/__tests__/src/router/instruction-parser.spec.ts on lines 137..137
packages/__tests__/src/router/instruction-parser.spec.ts on lines 138..138
packages/__tests__/src/router/instruction-parser.spec.ts on lines 163..163
packages/__tests__/src/router/instruction-parser.spec.ts on lines 164..164
packages/__tests__/src/router/instruction-parser.spec.ts on lines 171..171
packages/__tests__/src/router/instruction-parser.spec.ts on lines 172..172

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

  green<T extends string>(str: T): T {
    return `\u001b[32m${str}\u001b[39m` as T;
  },
Severity: Major
Found in packages/kernel/src/logger.ts and 7 other locations - About 30 mins to fix
packages/kernel/src/logger.ts on lines 202..204
packages/kernel/src/logger.ts on lines 208..210
packages/kernel/src/logger.ts on lines 211..213
packages/kernel/src/logger.ts on lines 214..216
packages/kernel/src/logger.ts on lines 217..219
packages/kernel/src/logger.ts on lines 220..222
packages/kernel/src/logger.ts on lines 223..225

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

  white<T extends string>(str: T): T {
    return `\u001b[37m${str}\u001b[39m` as T;
  },
Severity: Major
Found in packages/kernel/src/logger.ts and 7 other locations - About 30 mins to fix
packages/kernel/src/logger.ts on lines 202..204
packages/kernel/src/logger.ts on lines 205..207
packages/kernel/src/logger.ts on lines 208..210
packages/kernel/src/logger.ts on lines 211..213
packages/kernel/src/logger.ts on lines 214..216
packages/kernel/src/logger.ts on lines 217..219
packages/kernel/src/logger.ts on lines 223..225

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

  magenta<T extends string>(str: T): T {
    return `\u001b[35m${str}\u001b[39m` as T;
  },
Severity: Major
Found in packages/kernel/src/logger.ts and 7 other locations - About 30 mins to fix
packages/kernel/src/logger.ts on lines 202..204
packages/kernel/src/logger.ts on lines 205..207
packages/kernel/src/logger.ts on lines 208..210
packages/kernel/src/logger.ts on lines 211..213
packages/kernel/src/logger.ts on lines 217..219
packages/kernel/src/logger.ts on lines 220..222
packages/kernel/src/logger.ts on lines 223..225

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

  cyan<T extends string>(str: T): T {
    return `\u001b[36m${str}\u001b[39m` as T;
  },
Severity: Major
Found in packages/kernel/src/logger.ts and 7 other locations - About 30 mins to fix
packages/kernel/src/logger.ts on lines 202..204
packages/kernel/src/logger.ts on lines 205..207
packages/kernel/src/logger.ts on lines 208..210
packages/kernel/src/logger.ts on lines 211..213
packages/kernel/src/logger.ts on lines 214..216
packages/kernel/src/logger.ts on lines 220..222
packages/kernel/src/logger.ts on lines 223..225

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

      { instruction: '(b+c/d)', parsed: [{ "component": "b" }, { "component": "c", "children": [{ "component": "d" }] }], clean: 'b+c/d' },
Severity: Major
Found in packages/__tests__/src/router/instruction-parser.spec.ts and 11 other locations - About 30 mins to fix
packages/__tests__/src/router/instruction-parser.spec.ts on lines 123..123
packages/__tests__/src/router/instruction-parser.spec.ts on lines 124..124
packages/__tests__/src/router/instruction-parser.spec.ts on lines 131..131
packages/__tests__/src/router/instruction-parser.spec.ts on lines 132..132
packages/__tests__/src/router/instruction-parser.spec.ts on lines 139..139
packages/__tests__/src/router/instruction-parser.spec.ts on lines 140..140
packages/__tests__/src/router/instruction-parser.spec.ts on lines 146..146
packages/__tests__/src/router/instruction-parser.spec.ts on lines 152..152
packages/__tests__/src/router/instruction-parser.spec.ts on lines 165..165
packages/__tests__/src/router/instruction-parser.spec.ts on lines 166..166
packages/__tests__/src/router/instruction-parser.spec.ts on lines 174..174

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

      { instruction: '((a/b)+c)', parsed: [{ "component": "a", "children": [{ "component": "b" }] }, { "component": "c" }], clean: 'a/b+c' },
Severity: Major
Found in packages/__tests__/src/router/instruction-parser.spec.ts and 9 other locations - About 30 mins to fix
packages/__tests__/src/router/instruction-parser.spec.ts on lines 121..121
packages/__tests__/src/router/instruction-parser.spec.ts on lines 122..122
packages/__tests__/src/router/instruction-parser.spec.ts on lines 129..129
packages/__tests__/src/router/instruction-parser.spec.ts on lines 130..130
packages/__tests__/src/router/instruction-parser.spec.ts on lines 137..137
packages/__tests__/src/router/instruction-parser.spec.ts on lines 138..138
packages/__tests__/src/router/instruction-parser.spec.ts on lines 163..163
packages/__tests__/src/router/instruction-parser.spec.ts on lines 171..171
packages/__tests__/src/router/instruction-parser.spec.ts on lines 172..172

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

      { instruction: '(a/b+c)', parsed: [{ "component": "a", "children": [{ "component": "b" }] }, { "component": "c" }], clean: 'a/b+c' },
Severity: Major
Found in packages/__tests__/src/router/instruction-parser.spec.ts and 9 other locations - About 30 mins to fix
packages/__tests__/src/router/instruction-parser.spec.ts on lines 121..121
packages/__tests__/src/router/instruction-parser.spec.ts on lines 122..122
packages/__tests__/src/router/instruction-parser.spec.ts on lines 129..129
packages/__tests__/src/router/instruction-parser.spec.ts on lines 130..130
packages/__tests__/src/router/instruction-parser.spec.ts on lines 137..137
packages/__tests__/src/router/instruction-parser.spec.ts on lines 138..138
packages/__tests__/src/router/instruction-parser.spec.ts on lines 164..164
packages/__tests__/src/router/instruction-parser.spec.ts on lines 171..171
packages/__tests__/src/router/instruction-parser.spec.ts on lines 172..172

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

      { instruction: '(b/c+d)', parsed: [{ "component": "b", "children": [{ "component": "c" }] }, { "component": "d" }], clean: 'b/c+d' },
Severity: Major
Found in packages/__tests__/src/router/instruction-parser.spec.ts and 9 other locations - About 30 mins to fix
packages/__tests__/src/router/instruction-parser.spec.ts on lines 121..121
packages/__tests__/src/router/instruction-parser.spec.ts on lines 122..122
packages/__tests__/src/router/instruction-parser.spec.ts on lines 129..129
packages/__tests__/src/router/instruction-parser.spec.ts on lines 130..130
packages/__tests__/src/router/instruction-parser.spec.ts on lines 137..137
packages/__tests__/src/router/instruction-parser.spec.ts on lines 138..138
packages/__tests__/src/router/instruction-parser.spec.ts on lines 163..163
packages/__tests__/src/router/instruction-parser.spec.ts on lines 164..164
packages/__tests__/src/router/instruction-parser.spec.ts on lines 172..172

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

    const fakeAction = (currentState: testState, param1: string, param2: string) => {
      return { ...currentState, foo: param1 + param2 };
    };
Severity: Minor
Found in packages/__tests__/src/store-v1/store.spec.ts and 2 other locations - About 30 mins to fix
packages/__tests__/src/store-v1/dispatchify.spec.ts on lines 12..14
packages/__tests__/src/store-v1/store.spec.ts on lines 437..439

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

  const fakeAction = (currentState: testState, param1: string, param2: string) => {
    return { ...currentState, foo: param1 + param2 };
  };
Severity: Minor
Found in packages/__tests__/src/store-v1/dispatchify.spec.ts and 2 other locations - About 30 mins to fix
packages/__tests__/src/store-v1/store.spec.ts on lines 124..126
packages/__tests__/src/store-v1/store.spec.ts on lines 437..439

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

      { instruction: 'b/c+d', parsed: [{ "component": "b", "children": [{ "component": "c" }] }, { "component": "d" }], clean: 'b/c+d' },
Severity: Major
Found in packages/__tests__/src/router/instruction-parser.spec.ts and 9 other locations - About 30 mins to fix
packages/__tests__/src/router/instruction-parser.spec.ts on lines 121..121
packages/__tests__/src/router/instruction-parser.spec.ts on lines 122..122
packages/__tests__/src/router/instruction-parser.spec.ts on lines 129..129
packages/__tests__/src/router/instruction-parser.spec.ts on lines 130..130
packages/__tests__/src/router/instruction-parser.spec.ts on lines 138..138
packages/__tests__/src/router/instruction-parser.spec.ts on lines 163..163
packages/__tests__/src/router/instruction-parser.spec.ts on lines 164..164
packages/__tests__/src/router/instruction-parser.spec.ts on lines 171..171
packages/__tests__/src/router/instruction-parser.spec.ts on lines 172..172

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

      const fakeAction = (currentState: testState, param1: string, param2: string) => {
        return { ...currentState, foo: param1 + param2 };
      };
Severity: Minor
Found in packages/__tests__/src/store-v1/store.spec.ts and 2 other locations - About 30 mins to fix
packages/__tests__/src/store-v1/dispatchify.spec.ts on lines 12..14
packages/__tests__/src/store-v1/store.spec.ts on lines 124..126

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

      { instruction: '(a/b)+c', parsed: [{ "component": "a", "children": [{ "component": "b" }] }, { "component": "c" }], clean: 'a/b+c' },
Severity: Major
Found in packages/__tests__/src/router/instruction-parser.spec.ts and 9 other locations - About 30 mins to fix
packages/__tests__/src/router/instruction-parser.spec.ts on lines 121..121
packages/__tests__/src/router/instruction-parser.spec.ts on lines 129..129
packages/__tests__/src/router/instruction-parser.spec.ts on lines 130..130
packages/__tests__/src/router/instruction-parser.spec.ts on lines 137..137
packages/__tests__/src/router/instruction-parser.spec.ts on lines 138..138
packages/__tests__/src/router/instruction-parser.spec.ts on lines 163..163
packages/__tests__/src/router/instruction-parser.spec.ts on lines 164..164
packages/__tests__/src/router/instruction-parser.spec.ts on lines 171..171
packages/__tests__/src/router/instruction-parser.spec.ts on lines 172..172

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

  red<T extends string>(str: T): T {
    return `\u001b[31m${str}\u001b[39m` as T;
  },
Severity: Major
Found in packages/kernel/src/logger.ts and 7 other locations - About 30 mins to fix
packages/kernel/src/logger.ts on lines 205..207
packages/kernel/src/logger.ts on lines 208..210
packages/kernel/src/logger.ts on lines 211..213
packages/kernel/src/logger.ts on lines 214..216
packages/kernel/src/logger.ts on lines 217..219
packages/kernel/src/logger.ts on lines 220..222
packages/kernel/src/logger.ts on lines 223..225

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