Showing 57 of 57 total issues

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

Function animatedFlyTip has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

var animatedFlyTip = function($filter) {
  return {
    fly: function(num, useSeparator = false) {
      var $element = $('<div />');

Severity: Minor
Found in src/js/animatedflytip.js - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function gameTimer has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

var gameTimer = function($q, $interval, $timeout, $window, GameState, AdManager, GainCalculator) {

  var interval = null;
  var timerDefer = $q.defer();

Severity: Minor
Found in src/js/gametimer.js - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

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

  var timerBoost = (upgrade) => Math.max(1, Math.pow(upgrade.getKey('Basic Timer Boost') || 0, 2)+1);
Severity: Minor
Found in src/js/gaincalculator.js and 1 other location - About 30 mins to fix
src/js/gaincalculator.js on lines 3..3

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

  var boost = (upgrade) => Math.max(1, Math.pow(upgrade.getKey('Basic Boost') || 0, 2)+1);
Severity: Minor
Found in src/js/gaincalculator.js and 1 other location - About 30 mins to fix
src/js/gaincalculator.js on lines 11..11

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

  '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

  '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

  '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

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

  '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

  '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

Function gainCalculator has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

var gainCalculator = function() {

  var boost = (upgrade) => Math.max(1, Math.pow(upgrade.getKey('Basic Boost') || 0, 2)+1);

  var iteration = function(upgrade) {
Severity: Minor
Found in src/js/gaincalculator.js - About 25 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Severity
Category
Status
Source
Language