bastienrobert/la-ferme

View on GitHub

Showing 148 of 214 total issues

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

const Menu: FC<MenuProps> = ({ setPopup }) => {
  const [visible, setVisible] = useState(false)
  const { theme } = useTheme()

  const color = complementaries[theme]
Severity: Major
Found in packages/mobile/src/pages/samples/Game/Menu.tsx and 1 other location - About 2 days to fix
packages/mobile/src/pages/Game/Main/Menu.tsx on lines 29..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 404.

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

const Menu: FC<MenuProps> = ({ setPopup }) => {
  const [visible, setVisible] = useState(false)
  const { theme } = useTheme()

  const color = complementaries[theme]
Severity: Major
Found in packages/mobile/src/pages/Game/Main/Menu.tsx and 1 other location - About 2 days to fix
packages/mobile/src/pages/samples/Game/Menu.tsx on lines 24..73

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

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

export async function up(knex: Knex): Promise<any> {
  await knex.raw('CREATE EXTENSION IF NOT EXISTS "uuid-ossp"')

  await knex.schema.createTable('mini_games', table => {
    table.increments('id').primary()
packages/server/db/migrate/20200401181734_create_games.ts on lines 3..17

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

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

export async function up(knex: Knex): Promise<any> {
  await knex.raw('CREATE EXTENSION IF NOT EXISTS "uuid-ossp"')

  await knex.schema.createTable('games', table => {
    table.increments('id').primary()
Severity: Major
Found in packages/server/db/migrate/20200401181734_create_games.ts and 1 other location - About 6 hrs to fix
packages/server/db/migrate/20200627123512_create_mini_games.ts on lines 3..17

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

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

const WalktroughSkill: FC<WalktroughSkillProps> = ({ color, ...props }) => {
  const main = Colors[color]
  const secondary = Colors[complementaries[color]]

  return (
Severity: Major
Found in packages/mobile/src/components/svgs/WalktroughSkill.tsx and 1 other location - About 6 hrs to fix
packages/mobile/src/components/svgs/WalktroughCharacter.tsx on lines 11..34

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

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

const WalktroughCharacter: FC<WalktroughCharacterProps> = ({
  color,
  ...props
}) => {
  const main = Colors[color]
Severity: Major
Found in packages/mobile/src/components/svgs/WalktroughCharacter.tsx and 1 other location - About 6 hrs to fix
packages/mobile/src/components/svgs/WalktroughSkill.tsx on lines 11..31

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

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

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

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

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

Refactorings

Further Reading

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

const GameOverDecorations: FC = () => {
  return (
    <>
      <CrossImage source={require('@/assets/images/gameover/cross.png')} />
      <LineImage source={require('@/assets/images/gameover/line.png')} />
packages/mobile/src/pages/samples/Game/Popup/GameOver/GameOverDecorations.tsx on lines 7..24

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

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

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

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

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

Refactorings

Further Reading

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

const GameOverDecorations: FC = () => {
  return (
    <>
      <CrossImage source={require('@/assets/images/gameover/cross.png')} />
      <LineImage source={require('@/assets/images/gameover/line.png')} />
packages/mobile/src/pages/Game/Main/Popup/GameOver/GameOverDecorations.tsx on lines 7..24

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

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

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

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

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

Refactorings

Further Reading

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

const CardSkillUp: FC<SvgProps> = props => {
  return (
    <Svg viewBox={`0 0 ${WIDTH} ${HEIGHT}`} fill="none" {...props}>
      <Path
        fill={Colors.beige}
Severity: Major
Found in packages/mobile/src/components/cards/skill/up.tsx and 7 other locations - About 2 hrs to fix
packages/mobile/src/components/cards/just_arrived/down.tsx on lines 10..19
packages/mobile/src/components/cards/just_arrived/up.tsx on lines 10..19
packages/mobile/src/components/cards/skill/down.tsx on lines 10..19
packages/mobile/src/components/cards/statistics/down.tsx on lines 10..19
packages/mobile/src/components/cards/statistics/up.tsx on lines 10..19
packages/mobile/src/components/cards/walktrough/down.tsx on lines 10..19
packages/mobile/src/components/cards/walktrough/up.tsx on lines 10..19

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

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

  return (
    <Component>
      <FullscreenVideo
        paused={paused}
        onEnd={onSkipPress}
Severity: Major
Found in packages/mobile/src/pages/Introduction.tsx and 1 other location - About 2 hrs to fix
packages/mobile/src/pages/Onboarding/Setup/index.tsx on lines 44..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 91.

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

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

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

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

Refactorings

Further Reading

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

const CardStatisticsDown: FC<SvgProps> = props => {
  return (
    <Svg viewBox={`0 0 ${WIDTH} ${HEIGHT}`} fill="none" {...props}>
      <Path
        fill={Colors.beige}
Severity: Major
Found in packages/mobile/src/components/cards/statistics/down.tsx and 7 other locations - About 2 hrs to fix
packages/mobile/src/components/cards/just_arrived/down.tsx on lines 10..19
packages/mobile/src/components/cards/just_arrived/up.tsx on lines 10..19
packages/mobile/src/components/cards/skill/down.tsx on lines 10..19
packages/mobile/src/components/cards/skill/up.tsx on lines 10..19
packages/mobile/src/components/cards/statistics/up.tsx on lines 10..19
packages/mobile/src/components/cards/walktrough/down.tsx on lines 10..19
packages/mobile/src/components/cards/walktrough/up.tsx on lines 10..19

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

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

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

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

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

Refactorings

Further Reading

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

const CardStatisticsUp: FC<SvgProps> = props => {
  return (
    <Svg viewBox={`0 0 ${WIDTH} ${HEIGHT}`} fill="none" {...props}>
      <Path
        fill={Colors.beige}
Severity: Major
Found in packages/mobile/src/components/cards/statistics/up.tsx and 7 other locations - About 2 hrs to fix
packages/mobile/src/components/cards/just_arrived/down.tsx on lines 10..19
packages/mobile/src/components/cards/just_arrived/up.tsx on lines 10..19
packages/mobile/src/components/cards/skill/down.tsx on lines 10..19
packages/mobile/src/components/cards/skill/up.tsx on lines 10..19
packages/mobile/src/components/cards/statistics/down.tsx on lines 10..19
packages/mobile/src/components/cards/walktrough/down.tsx on lines 10..19
packages/mobile/src/components/cards/walktrough/up.tsx on lines 10..19

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

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

  return (
    <Component>
      <FullscreenVideo
        paused={paused}
        onEnd={onSkipPress}
Severity: Major
Found in packages/mobile/src/pages/Onboarding/Setup/index.tsx and 1 other location - About 2 hrs to fix
packages/mobile/src/pages/Introduction.tsx on lines 47..58

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

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

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

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

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

Refactorings

Further Reading

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

const CardSkillDown: FC<SvgProps> = props => {
  return (
    <Svg viewBox={`0 0 ${WIDTH} ${HEIGHT}`} fill="none" {...props}>
      <Path
        fill={Colors.beige}
Severity: Major
Found in packages/mobile/src/components/cards/skill/down.tsx and 7 other locations - About 2 hrs to fix
packages/mobile/src/components/cards/just_arrived/down.tsx on lines 10..19
packages/mobile/src/components/cards/just_arrived/up.tsx on lines 10..19
packages/mobile/src/components/cards/skill/up.tsx on lines 10..19
packages/mobile/src/components/cards/statistics/down.tsx on lines 10..19
packages/mobile/src/components/cards/statistics/up.tsx on lines 10..19
packages/mobile/src/components/cards/walktrough/down.tsx on lines 10..19
packages/mobile/src/components/cards/walktrough/up.tsx on lines 10..19

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

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

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

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

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

Refactorings

Further Reading

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

      <BottomStyledContainer style={{ aspectRatio: CARD_SKILL_DOWN_RATIO }}>
        <StyledCard as={CardSkillDown} />
        <BottomInner>
          <SkillActions
            confirm={confirm}
Severity: Major
Found in packages/mobile/src/pages/samples/Game/Popup/Skill/index.tsx and 1 other location - About 2 hrs to fix
packages/mobile/src/pages/Game/Main/Popup/Skill/index.tsx on lines 88..98

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

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

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

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

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

Refactorings

Further Reading

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

      <BottomStyledContainer style={{ aspectRatio: CARD_SKILL_DOWN_RATIO }}>
        <StyledCard as={CardSkillDown} />
        <BottomInner>
          <SkillActions
            confirm={confirm}
Severity: Major
Found in packages/mobile/src/pages/Game/Main/Popup/Skill/index.tsx and 1 other location - About 2 hrs to fix
packages/mobile/src/pages/samples/Game/Popup/Skill/index.tsx on lines 61..71

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

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

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

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

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

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Confirmed

const PlayerChoice: FC<any> = ({ player, players, onSubmit }) => {
  return (
    <Component alignSelf="center">
      <GameCard player={player} players={players} />
    </Component>
packages/mobile/src/pages/samples/Game/Round/RoundViewer/PlayerChoice.tsx on lines 7..13

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

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

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

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

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

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Confirmed

const PlayerChoice: FC<any> = ({ player, players, onSubmit }) => {
  return (
    <Component alignSelf="center">
      <GameCard player={player} players={players} />
    </Component>
packages/mobile/src/pages/samples/Game/Round/RoundPlayer/PlayerChoice.tsx on lines 7..13

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

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

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

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

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

Refactorings

Further Reading

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

  {
    name: 'stuck',
    displayName: 'Coincé!',
    playerText:
      "Votre patte est coincée!! Remerciez Monsieur Joe Jumper de s'être adosser à la barre du métro sans gêne.",
Severity: Major
Found in packages/shared/data/cards/uncivil.ts and 9 other locations - About 2 hrs to fix
packages/shared/data/cards/uncivil.ts on lines 4..22
packages/shared/data/cards/uncivil.ts on lines 41..59
packages/shared/data/cards/uncivil.ts on lines 78..96
packages/shared/data/cards/uncivil.ts on lines 134..152
packages/shared/data/cards/uncivil.ts on lines 153..171
packages/shared/data/cards/uncivil.ts on lines 172..190
packages/shared/data/cards/uncivil.ts on lines 209..227
packages/shared/data/cards/uncivil.ts on lines 228..246
packages/shared/data/cards/uncivil.ts on lines 247..265

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

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

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

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

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

Refactorings

Further Reading

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

  {
    name: 'big-party',
    displayName: 'Big party!',
    playerText:
      "C'est la fièvre du samedi soir chez votre voisinne Claudine! Vous décidez d'appeler la brigade!",
Severity: Major
Found in packages/shared/data/cards/uncivil.ts and 9 other locations - About 2 hrs to fix
packages/shared/data/cards/uncivil.ts on lines 4..22
packages/shared/data/cards/uncivil.ts on lines 41..59
packages/shared/data/cards/uncivil.ts on lines 78..96
packages/shared/data/cards/uncivil.ts on lines 97..115
packages/shared/data/cards/uncivil.ts on lines 153..171
packages/shared/data/cards/uncivil.ts on lines 172..190
packages/shared/data/cards/uncivil.ts on lines 209..227
packages/shared/data/cards/uncivil.ts on lines 228..246
packages/shared/data/cards/uncivil.ts on lines 247..265

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

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