src/js/upgrades.js

Summary

Maintainability
F
3 days
Test Coverage

File upgrades.js has 283 lines of code (exceeds 250 allowed). Consider refactoring.
Open


module.exports = {
  Scoreboard: {
    category: 'Visual',
    levels: [{cost: 5, description: 'Visualize your score!'}]
Severity: Minor
Found in src/js/upgrades.js - About 2 hrs to fix

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

  'Basic Boost': {
    category: 'Tech',
    requirements: {Function: 0},
    levels: [
      {cost: 10, description: 'Bigger boost means more production happening at once.'},
Severity: Major
Found in src/js/upgrades.js and 2 other locations - About 2 hrs to fix
src/js/upgrades.js on lines 26..35
src/js/upgrades.js on lines 36..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 76.

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

  'Basic Iteration': {
    category: 'Tech',
    requirements: {Function: 0},
    levels: [
      {cost: 50, description: 'More iterations means faster production.'},
Severity: Major
Found in src/js/upgrades.js and 2 other locations - About 2 hrs to fix
src/js/upgrades.js on lines 36..45
src/js/upgrades.js on lines 46..55

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

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

  'Basic Timer': {
    category: 'Tech',
    requirements: {Function: 0},
    levels: [
      {cost: 50, description: 'A timer runs and automatically produces for you every so often.'},
Severity: Major
Found in src/js/upgrades.js and 2 other locations - About 2 hrs to fix
src/js/upgrades.js on lines 26..35
src/js/upgrades.js on lines 46..55

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

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

  'Save': {
    category: 'Tech',
    requirements: {'Basic Layout': 0},
    levels: [
      {cost: 300, description: 'Introduce a save button that allows you to save your progress.'},
Severity: Major
Found in src/js/upgrades.js and 1 other location - About 2 hrs to fix
src/js/upgrades.js on lines 153..162

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

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

  'Advanced Timer': {
    category: 'Tech',
    requirements: {'Basic Timer': 3},
    levels: [
      {cost: 200000, description: 'The timer is back and faster than ever.'},
Severity: Major
Found in src/js/upgrades.js and 1 other location - About 2 hrs to fix
src/js/upgrades.js on lines 143..152

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

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

  'Upgrade Visibility': {
    category: 'Cosmetic',
    requirements: {'Alphabetized Upgrades': 0},
    levels: [
      {cost: 6500, description: 'Upgrades will appear slightly before you can buy them.'},
Severity: Major
Found in src/js/upgrades.js and 2 other locations - About 1 hr to fix
src/js/upgrades.js on lines 188..196
src/js/upgrades.js on lines 207..215

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

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

  'Offline Progress': {
    category: 'Tech',
    requirements: {'Basic Timer': 0},
    levels: [
      {cost: 10000, description: 'You will gain progress slowly, even while the game is not open.'},
Severity: Major
Found in src/js/upgrades.js and 2 other locations - About 1 hr to fix
src/js/upgrades.js on lines 86..94
src/js/upgrades.js on lines 207..215

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

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

  'Basic Timer Boost': {
    category: 'Tech',
    requirements: {'Basic Timer': 0},
    levels: [
      {cost: 10000, description: 'You get more production via timer methods.'},
Severity: Major
Found in src/js/upgrades.js and 2 other locations - About 1 hr to fix
src/js/upgrades.js on lines 86..94
src/js/upgrades.js on lines 188..196

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

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

  'Upgrade Tree': {
    category: 'Tech',
    requirements: {'Tabbed Output': 0, 'Basic Color': 0, 'Tooltips': 0, 'Basic Animation': 0},
    levels: [{cost: 100000, description: 'Visualize the upgrade tree! Oooh, pretty!'}]
  },
Severity: Major
Found in src/js/upgrades.js and 1 other location - About 1 hr to fix
src/js/upgrades.js on lines 123..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 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

  'Basic Animation': {
    category: 'Cosmetic',
    requirements: {'Basic Style': 0, 'Basic Iteration': 0, 'Basic Color': 0, 'Better Layout': 1},
    levels: [{cost: 100000, description: 'Sprinkle some animations onto the page.'}]
  },
Severity: Major
Found in src/js/upgrades.js and 1 other location - About 1 hr to fix
src/js/upgrades.js on lines 274..278

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

  'Better Layout': {
    category: 'Visual',
    requirements: {'Basic Layout': 1},
    levels: [
      {cost: 200, description: 'One of the better layouts you get to see.'},
Severity: Major
Found in src/js/upgrades.js and 2 other locations - About 50 mins to fix
src/js/upgrades.js on lines 100..107
src/js/upgrades.js on lines 246..253

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

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

  'Basic Style': {
    category: 'Visual',
    requirements: {'Better Layout': 1},
    levels: [
      {cost: 10000, description: 'Yes, it does get better! This upgrade makes the table look nicer.'},
Severity: Major
Found in src/js/upgrades.js and 2 other locations - About 50 mins to fix
src/js/upgrades.js on lines 14..21
src/js/upgrades.js on lines 246..253

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

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

  'Production History': {
    category: 'Tech',
    requirements: {'Production Breakdown': 0},
    levels: [
      {cost: 50000, description: 'Slightly improve your historical data!'},
Severity: Major
Found in src/js/upgrades.js and 2 other locations - About 50 mins to fix
src/js/upgrades.js on lines 14..21
src/js/upgrades.js on lines 100..107

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

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

  'Tabbed Output': {
    category: 'Tech',
    requirements: {'Better Layout': 0, 'Basic Style': 0},
    levels: [{cost: 200000, description: 'Produce some tabs for your output section! Note, this only comes with one tab -- the one you have!'}]
  },
Severity: Major
Found in src/js/upgrades.js and 8 other locations - About 30 mins to fix
src/js/upgrades.js on lines 76..80
src/js/upgrades.js on lines 81..85
src/js/upgrades.js on lines 133..137
src/js/upgrades.js on lines 163..167
src/js/upgrades.js on lines 236..240
src/js/upgrades.js on lines 241..245
src/js/upgrades.js on lines 264..268
src/js/upgrades.js on lines 269..273

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

  'Production Over Time': {
    category: 'Tech',
    requirements: {'Tabbed Output': 0, 'Number Formatting': 0},
    levels: [{cost: 2000000, description: 'Produce a new tab that shows your production over time!'}]
  },
Severity: Major
Found in src/js/upgrades.js and 8 other locations - About 30 mins to fix
src/js/upgrades.js on lines 76..80
src/js/upgrades.js on lines 81..85
src/js/upgrades.js on lines 133..137
src/js/upgrades.js on lines 163..167
src/js/upgrades.js on lines 231..235
src/js/upgrades.js on lines 241..245
src/js/upgrades.js on lines 264..268
src/js/upgrades.js on lines 269..273

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

  'Production Breakdown': {
    category: 'Tech',
    requirements: {'Tabbed Output': 0, 'Number Formatting': 0},
    levels: [{cost: 2000000, description: 'Produce a new tab that shows your production breakdown!'}]
  },
Severity: Major
Found in src/js/upgrades.js and 8 other locations - About 30 mins to fix
src/js/upgrades.js on lines 76..80
src/js/upgrades.js on lines 81..85
src/js/upgrades.js on lines 133..137
src/js/upgrades.js on lines 163..167
src/js/upgrades.js on lines 231..235
src/js/upgrades.js on lines 236..240
src/js/upgrades.js on lines 264..268
src/js/upgrades.js on lines 269..273

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

  'Better Page Title': {
    category: 'Cosmetic',
    requirements: {'Page Title': 0, 'Scoreboard': 0},
    levels: [{cost: 2500, description: 'Just when you thought the page title looked good, it gets better!'}]
  },
Severity: Major
Found in src/js/upgrades.js and 8 other locations - About 30 mins to fix
src/js/upgrades.js on lines 81..85
src/js/upgrades.js on lines 133..137
src/js/upgrades.js on lines 163..167
src/js/upgrades.js on lines 231..235
src/js/upgrades.js on lines 236..240
src/js/upgrades.js on lines 241..245
src/js/upgrades.js on lines 264..268
src/js/upgrades.js on lines 269..273

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

  'Alphabetized Upgrades': {
    category: 'Cosmetic',
    requirements: {'Capitalization': 0, 'Better Layout': 0},
    levels: [{cost: 5000, description: 'Putting the upgrades in some kind of order makes them much easier to navigate.'}]
  },
Severity: Major
Found in src/js/upgrades.js and 8 other locations - About 30 mins to fix
src/js/upgrades.js on lines 76..80
src/js/upgrades.js on lines 133..137
src/js/upgrades.js on lines 163..167
src/js/upgrades.js on lines 231..235
src/js/upgrades.js on lines 236..240
src/js/upgrades.js on lines 241..245
src/js/upgrades.js on lines 264..268
src/js/upgrades.js on lines 269..273

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

  'Best Table': {
    category: 'Tech',
    requirements: {'Basic Style': 1, 'Alphabetized Upgrades': 0},
    levels: [{cost: 250000, description: 'This gives you the best upgrade table possible!'}]
  },
Severity: Major
Found in src/js/upgrades.js and 8 other locations - About 30 mins to fix
src/js/upgrades.js on lines 76..80
src/js/upgrades.js on lines 81..85
src/js/upgrades.js on lines 133..137
src/js/upgrades.js on lines 231..235
src/js/upgrades.js on lines 236..240
src/js/upgrades.js on lines 241..245
src/js/upgrades.js on lines 264..268
src/js/upgrades.js on lines 269..273

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

  'Achievements': {
    category: 'Tech',
    requirements: {'Scoreboard': 0, 'Notifications': 0},
    levels: [{cost: 75000, description: 'If you have goals in life, this is recommended.'}]
  },
Severity: Major
Found in src/js/upgrades.js and 8 other locations - About 30 mins to fix
src/js/upgrades.js on lines 76..80
src/js/upgrades.js on lines 81..85
src/js/upgrades.js on lines 133..137
src/js/upgrades.js on lines 163..167
src/js/upgrades.js on lines 231..235
src/js/upgrades.js on lines 236..240
src/js/upgrades.js on lines 241..245
src/js/upgrades.js on lines 269..273

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

  'Best Favicon': {
    category: 'Cosmetic',
    requirements: {'Better Page Title': 0, 'Favicon': 0},
    levels: [{cost: 100000, description: 'Get notified via favicon whenever you have a new upgrade to purchase.'}]
  },
Severity: Major
Found in src/js/upgrades.js and 8 other locations - About 30 mins to fix
src/js/upgrades.js on lines 76..80
src/js/upgrades.js on lines 81..85
src/js/upgrades.js on lines 163..167
src/js/upgrades.js on lines 231..235
src/js/upgrades.js on lines 236..240
src/js/upgrades.js on lines 241..245
src/js/upgrades.js on lines 264..268
src/js/upgrades.js on lines 269..273

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

  'Achievements Menu': {
    category: 'Tech',
    requirements: {'Achievements': 0, 'Menu': 0},
    levels: [{cost: 777777, description: 'If you want to view your goals in life, this is recommended.'}]
  },
Severity: Major
Found in src/js/upgrades.js and 8 other locations - About 30 mins to fix
src/js/upgrades.js on lines 76..80
src/js/upgrades.js on lines 81..85
src/js/upgrades.js on lines 133..137
src/js/upgrades.js on lines 163..167
src/js/upgrades.js on lines 231..235
src/js/upgrades.js on lines 236..240
src/js/upgrades.js on lines 241..245
src/js/upgrades.js on lines 264..268

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

There are no issues that match your filters.

Category
Status