bastienrobert/la-ferme

View on GitHub

Showing 148 of 214 total issues

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

        <StyledTitleWithHashtag
          title={global.title}
          titleColor="beige"
          hashtag={[global.description]}
          hashtagColor="yellow"
packages/mobile/src/pages/Game/Main/Popup/Skill/SkillHeader.tsx on lines 17..25

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

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

        <ButtonContainer alignSelf="center">
          <Button onPress={onConfirmPress}>{content.cta_yes}</Button>
          <Button onPress={onResetPress}>{content.cta_no}</Button>
        </ButtonContainer>
packages/mobile/src/pages/Game/Main/Popup/GameOver/index.tsx on lines 52..55
packages/mobile/src/pages/Game/Main/Popup/Report/index.tsx on lines 80..83
packages/mobile/src/pages/Game/Main/Popup/Skill/SkillActions.tsx on lines 45..48

Duplicated Code

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

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

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

Tuning

This issue has a mass of 69.

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

        <ButtonContainer alignSelf="center">
          <Button onPress={onConfirmPress}>{content.cta_yes}</Button>
          <Button onPress={onCancelPress}>{content.cta_no}</Button>
        </ButtonContainer>
packages/mobile/src/pages/Game/Main/Popup/GameOver/index.tsx on lines 52..55
packages/mobile/src/pages/Game/Main/Popup/Report/index.tsx on lines 80..83
packages/mobile/src/pages/Game/Main/Popup/Skill/SkillRequest/SkillContent.tsx on lines 74..77

Duplicated Code

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

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

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

Tuning

This issue has a mass of 69.

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

          <ButtonContainer alignSelf="center">
            <Button onPress={onConfirm}>{content.cta_yes}</Button>
            <Button onPress={onCancel}>{content.cta_no}</Button>
          </ButtonContainer>
Severity: Major
Found in packages/mobile/src/pages/Game/Main/Popup/Report/index.tsx and 3 other locations - About 1 hr to fix
packages/mobile/src/pages/Game/Main/Popup/GameOver/index.tsx on lines 52..55
packages/mobile/src/pages/Game/Main/Popup/Skill/SkillActions.tsx on lines 45..48
packages/mobile/src/pages/Game/Main/Popup/Skill/SkillRequest/SkillContent.tsx on lines 74..77

Duplicated Code

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

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

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

Tuning

This issue has a mass of 69.

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

        <Container alignSelf="center">
          <Title preset="H1" color="red" textAlign="center">
            la brigade
          </Title>
          <Text color="beige" textAlign="center">
Severity: Major
Found in packages/mobile/src/pages/samples/Game/Popup/PhoneCall.tsx and 1 other location - About 1 hr to fix
packages/mobile/src/pages/samples/Game/Popup/Report/ReportComplete.tsx on lines 10..18

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

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

    <Container alignSelf="center">
      <StyledTitle preset="H2" color="red" textAlign="center">
        La brigade
      </StyledTitle>
      <StyledText color="beige" textAlign="center">
packages/mobile/src/pages/samples/Game/Popup/PhoneCall.tsx on lines 15..22

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

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

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

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

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

Refactorings

Further Reading

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

  {
    name: 'get-up',
    displayName: 'Lève-toi!',
    playerText:
      'Monsieur Lane ne veut pas se lever. Vous cédez votre place à Madame Henriette la biquette qui vous remercie.',
Severity: Major
Found in packages/shared/data/cards/civil.ts and 10 other locations - About 1 hr to fix
packages/shared/data/cards/civil.ts on lines 55..71
packages/shared/data/cards/civil.ts on lines 72..88
packages/shared/data/cards/civil.ts on lines 89..105
packages/shared/data/cards/civil.ts on lines 106..122
packages/shared/data/cards/civil.ts on lines 123..139
packages/shared/data/cards/civil.ts on lines 140..156
packages/shared/data/cards/civil.ts on lines 157..173
packages/shared/data/cards/civil.ts on lines 174..190
packages/shared/data/cards/civil.ts on lines 209..225
packages/shared/data/cards/civil.ts on lines 226..242

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

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

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

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

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

Refactorings

Further Reading

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

  {
    name: 'umbrella',
    displayName: 'Le parapluie',
    playerText:
      'Thierry Kermite ouvre son parapluie sans faire attention. Changez de trottoir pour gagner du temps.',
Severity: Major
Found in packages/shared/data/cards/civil.ts and 10 other locations - About 1 hr to fix
packages/shared/data/cards/civil.ts on lines 4..20
packages/shared/data/cards/civil.ts on lines 55..71
packages/shared/data/cards/civil.ts on lines 72..88
packages/shared/data/cards/civil.ts on lines 89..105
packages/shared/data/cards/civil.ts on lines 106..122
packages/shared/data/cards/civil.ts on lines 123..139
packages/shared/data/cards/civil.ts on lines 140..156
packages/shared/data/cards/civil.ts on lines 174..190
packages/shared/data/cards/civil.ts on lines 209..225
packages/shared/data/cards/civil.ts on lines 226..242

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

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

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

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

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

Refactorings

Further Reading

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

  {
    name: 'chicken-coop',
    displayName: 'Le poulailler',
    playerText:
      "Les deux personnes à côté de vous n'arrête pas de pialler au Gomont Paté! Vous changez de place.",
Severity: Major
Found in packages/shared/data/cards/civil.ts and 10 other locations - About 1 hr to fix
packages/shared/data/cards/civil.ts on lines 4..20
packages/shared/data/cards/civil.ts on lines 55..71
packages/shared/data/cards/civil.ts on lines 72..88
packages/shared/data/cards/civil.ts on lines 89..105
packages/shared/data/cards/civil.ts on lines 106..122
packages/shared/data/cards/civil.ts on lines 123..139
packages/shared/data/cards/civil.ts on lines 140..156
packages/shared/data/cards/civil.ts on lines 157..173
packages/shared/data/cards/civil.ts on lines 174..190
packages/shared/data/cards/civil.ts on lines 209..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 63.

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

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

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

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

Refactorings

Further Reading

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

  {
    name: 'clean-up',
    displayName: 'Nettoyage',
    playerText:
      'Vous décidez nettoyer les ordures du voisin sur le pallier. Le gardien vous remercie.',
Severity: Major
Found in packages/shared/data/cards/civil.ts and 10 other locations - About 1 hr to fix
packages/shared/data/cards/civil.ts on lines 4..20
packages/shared/data/cards/civil.ts on lines 55..71
packages/shared/data/cards/civil.ts on lines 72..88
packages/shared/data/cards/civil.ts on lines 89..105
packages/shared/data/cards/civil.ts on lines 123..139
packages/shared/data/cards/civil.ts on lines 140..156
packages/shared/data/cards/civil.ts on lines 157..173
packages/shared/data/cards/civil.ts on lines 174..190
packages/shared/data/cards/civil.ts on lines 209..225
packages/shared/data/cards/civil.ts on lines 226..242

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

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

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

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

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

Refactorings

Further Reading

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

  {
    name: 'bad-ninja',
    displayName: 'Vilain ninja',
    playerText:
      'Mr Jacasse décide fait une balayette sur une personne agée. Vous aidez la personne à se relever.',
Severity: Major
Found in packages/shared/data/cards/civil.ts and 10 other locations - About 1 hr to fix
packages/shared/data/cards/civil.ts on lines 4..20
packages/shared/data/cards/civil.ts on lines 55..71
packages/shared/data/cards/civil.ts on lines 72..88
packages/shared/data/cards/civil.ts on lines 89..105
packages/shared/data/cards/civil.ts on lines 106..122
packages/shared/data/cards/civil.ts on lines 140..156
packages/shared/data/cards/civil.ts on lines 157..173
packages/shared/data/cards/civil.ts on lines 174..190
packages/shared/data/cards/civil.ts on lines 209..225
packages/shared/data/cards/civil.ts on lines 226..242

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

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

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

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

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

Refactorings

Further Reading

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

  {
    name: 'manspreading',
    displayName: 'Manspreading',
    playerText:
      "Monsieur Trotro s'asseoit et vous propose son meilleur manspreading. Vous décidez de changer de place.",
Severity: Major
Found in packages/shared/data/cards/civil.ts and 10 other locations - About 1 hr to fix
packages/shared/data/cards/civil.ts on lines 4..20
packages/shared/data/cards/civil.ts on lines 72..88
packages/shared/data/cards/civil.ts on lines 89..105
packages/shared/data/cards/civil.ts on lines 106..122
packages/shared/data/cards/civil.ts on lines 123..139
packages/shared/data/cards/civil.ts on lines 140..156
packages/shared/data/cards/civil.ts on lines 157..173
packages/shared/data/cards/civil.ts on lines 174..190
packages/shared/data/cards/civil.ts on lines 209..225
packages/shared/data/cards/civil.ts on lines 226..242

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

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

        <IconContainer>
          <Icon icon="brigade" size={40} />
          <Title preset="H3" color="red">
            X{data.reports}
          </Title>
packages/mobile/src/pages/Game/Statistics/StatisticsCards/AppraisalContent.tsx on lines 73..78

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

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

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

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

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

Refactorings

Further Reading

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

  {
    name: 'spit-it-out',
    displayName: 'Crache le morceau',
    playerText:
      'Mr Dalaï a un chat dans la gorge et crache au milieu de la rue. Vous avertissez un agent de propreté.',
Severity: Major
Found in packages/shared/data/cards/civil.ts and 10 other locations - About 1 hr to fix
packages/shared/data/cards/civil.ts on lines 4..20
packages/shared/data/cards/civil.ts on lines 55..71
packages/shared/data/cards/civil.ts on lines 72..88
packages/shared/data/cards/civil.ts on lines 89..105
packages/shared/data/cards/civil.ts on lines 106..122
packages/shared/data/cards/civil.ts on lines 123..139
packages/shared/data/cards/civil.ts on lines 157..173
packages/shared/data/cards/civil.ts on lines 174..190
packages/shared/data/cards/civil.ts on lines 209..225
packages/shared/data/cards/civil.ts on lines 226..242

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

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

  {
    name: 'block-escalators',
    displayName: 'Bloquer les escalators',
    playerText:
      "Monsieur Tartare s'essouffle! Il fait une pause en plein milieu de l'escalator. Aucun moyen de le doubler.",
Severity: Major
Found in packages/shared/data/cards/civil.ts and 1 other location - About 1 hr to fix
packages/shared/data/cards/civil.ts on lines 38..54

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

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

        <IconContainer>
          <Icon icon="lightning" size={40} />
          <Title preset="H3" color="red">
            X{data.skill}
          </Title>
packages/mobile/src/pages/Game/Statistics/StatisticsCards/AppraisalContent.tsx on lines 67..72

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

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

export const statisticsByName: { [key: string]: Statistic } = statistics.reduce(
  (acc, c) => {
    acc[c.name] = c
    return acc
  },
Severity: Major
Found in packages/mobile/src/utils/helpers/statistics.ts and 3 other locations - About 1 hr to fix
packages/mobile/src/utils/helpers/goals.ts on lines 4..7
packages/mobile/src/utils/helpers/players.ts on lines 4..10
packages/mobile/src/utils/helpers/skills.ts on lines 4..10

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

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

export const skillsByName: { [key: string]: Skill } = skills.reduce(
  (acc, c) => {
    acc[c.name] = c
    return acc
  },
Severity: Major
Found in packages/mobile/src/utils/helpers/skills.ts and 3 other locations - About 1 hr to fix
packages/mobile/src/utils/helpers/goals.ts on lines 4..7
packages/mobile/src/utils/helpers/players.ts on lines 4..10
packages/mobile/src/utils/helpers/statistics.ts on lines 4..10

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

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

export const goalsByName: { [key: string]: Goal } = goals.reduce((acc, c) => {
  acc[c.name] = c
  return acc
}, {})
Severity: Major
Found in packages/mobile/src/utils/helpers/goals.ts and 3 other locations - About 1 hr to fix
packages/mobile/src/utils/helpers/players.ts on lines 4..10
packages/mobile/src/utils/helpers/skills.ts on lines 4..10
packages/mobile/src/utils/helpers/statistics.ts on lines 4..10

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

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

export const charactersByName: { [key: string]: Character } = characters.reduce(
  (acc, c) => {
    acc[c.name] = c
    return acc
  },
Severity: Major
Found in packages/mobile/src/utils/helpers/players.ts and 3 other locations - About 1 hr to fix
packages/mobile/src/utils/helpers/goals.ts on lines 4..7
packages/mobile/src/utils/helpers/skills.ts on lines 4..10
packages/mobile/src/utils/helpers/statistics.ts on lines 4..10

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

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