eduardomoroni/trading-card-manager

View on GitHub

Showing 244 of 244 total issues

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

export interface TokenEdgeSubscription
  extends Promise<AsyncIterator<TokenEdge>>,
    Fragmentable {
  node: <T = TokenSubscription>() => T;
  cursor: () => Promise<AsyncIterator<String>>;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3027..3032
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3345..3350
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3597..3602
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3714..3719
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3764..3769
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3877..3882

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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

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

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

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

Refactorings

Further Reading

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

export interface TypeEdgeSubscription
  extends Promise<AsyncIterator<TypeEdge>>,
    Fragmentable {
  node: <T = TypeSubscription>() => T;
  cursor: () => Promise<AsyncIterator<String>>;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3027..3032
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3176..3181
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3345..3350
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3714..3719
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3764..3769
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3877..3882

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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

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

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

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

Refactorings

Further Reading

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

export interface SetEdgeSubscription
  extends Promise<AsyncIterator<SetEdge>>,
    Fragmentable {
  node: <T = SetSubscription>() => T;
  cursor: () => Promise<AsyncIterator<String>>;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3027..3032
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3176..3181
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3345..3350
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3597..3602
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3764..3769
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3877..3882

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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

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

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

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

Refactorings

Further Reading

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

export interface SuperTypeEdgeSubscription
  extends Promise<AsyncIterator<SuperTypeEdge>>,
    Fragmentable {
  node: <T = SuperTypeSubscription>() => T;
  cursor: () => Promise<AsyncIterator<String>>;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3027..3032
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3176..3181
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3345..3350
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3597..3602
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3714..3719
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3764..3769

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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

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

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

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

Refactorings

Further Reading

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

export async function createGoogleCredential(
  idToken: string,
): Promise<auth.OAuthCredential | void> {
  try {
    return await auth.GoogleAuthProvider.credential(idToken);
Severity: Major
Found in packages/frontend/src/data/firebase/authentication.ts and 1 other location - About 2 hrs to fix
packages/frontend/src/data/firebase/authentication.ts on lines 86..94

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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

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

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

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

Refactorings

Further Reading

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

export interface PrintingEdgeSubscription
  extends Promise<AsyncIterator<PrintingEdge>>,
    Fragmentable {
  node: <T = PrintingSubscription>() => T;
  cursor: () => Promise<AsyncIterator<String>>;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3027..3032
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3176..3181
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3345..3350
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3597..3602
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3714..3719
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3877..3882

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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

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

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

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

Refactorings

Further Reading

Function addCard has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

export async function addCard(card: any, set: any, skipRetry: boolean = false) {
  try {
    console.log(`Adding card ${card.name}`);
    const uuid: string = card.uuid;
    const data: CardCreateInput = {
Severity: Minor
Found in packages/backend/db-migration/prisma/seed/card.ts - About 1 hr 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 5 locations. Consider refactoring.
Open

export interface SetUpdateInput {
  code?: String;
  block?: String;
  name?: String;
  releaseDate?: DateTimeInput;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 496..504
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 823..831
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 1140..1148
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 2667..2675

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

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

export interface SetCreateWithoutTokensInput {
  id?: ID_Input;
  code: String;
  block?: String;
  name?: String;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 496..504
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 823..831
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 2651..2659
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 2667..2675

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

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

export interface ForeignDataUpdateDataInput {
  multiverseId?: Int;
  flavorText?: String;
  language?: String;
  name?: String;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 823..831
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 1140..1148
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 2651..2659
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 2667..2675

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

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

export interface ForeignDataUpdateManyDataInput {
  multiverseId?: Int;
  flavorText?: String;
  language?: String;
  name?: String;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 496..504
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 1140..1148
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 2651..2659
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 2667..2675

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

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

export interface SetCreateWithoutCardsInput {
  id?: ID_Input;
  code: String;
  block?: String;
  name?: String;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 496..504
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 823..831
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 1140..1148
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 2651..2659

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

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

          <View style={{ ...styles.autoCompleteInputContainer, marginLeft: 2 }}>
            <Input
              value={supertype}
              autoCapitalize="none"
              placeholder={t(SUPERTYPE_INPUT_PLACEHOLDER)}
packages/frontend/src/presentation/screens/CardSearch/CardSearchFilterLayout.tsx on lines 70..79

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

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

          <View
            style={{ ...styles.autoCompleteInputContainer, marginRight: 2 }}
          >
            <Input
              value={subtype}
packages/frontend/src/presentation/screens/CardSearch/CardSearchFilterLayout.tsx on lines 80..87

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

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 CardDetails has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const CardDetails: React.FC<Props> = (props: Props) => {
  const { card } = props.route.params;
  const {
    name,
    manaCost,

    Function ManaCheckboxRow has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const ManaCheckboxRow: React.FC<Props> = (props: Props) => {
      const { colors, setColors } = props;
      function handleSelectColor(color: Color): void {
        if (colors.includes(color)) {
          return setColors(colors.filter(elem => elem != color));
    Severity: Minor
    Found in packages/frontend/src/presentation/components/ManaCheckboxRow.tsx - About 1 hr to fix

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

          if (
            errors.find((e: any) =>
              e.message.startsWith("No Node for the model Type with value")
            )
          ) {
      Severity: Major
      Found in packages/backend/db-migration/prisma/seed/card.ts and 3 other locations - About 1 hr to fix
      packages/backend/db-migration/prisma/seed/card.ts on lines 81..88
      packages/backend/db-migration/prisma/seed/card.ts on lines 89..96
      packages/backend/db-migration/prisma/seed/card.ts on lines 105..112

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

      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

          if (
            errors.find((e: any) =>
              e.message.startsWith("No Node for the model Printing with value")
            )
          ) {
      Severity: Major
      Found in packages/backend/db-migration/prisma/seed/card.ts and 3 other locations - About 1 hr to fix
      packages/backend/db-migration/prisma/seed/card.ts on lines 89..96
      packages/backend/db-migration/prisma/seed/card.ts on lines 97..104
      packages/backend/db-migration/prisma/seed/card.ts on lines 105..112

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

      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

          if (
            errors.find((e: any) =>
              e.message.startsWith("No Node for the model SubType with value")
            )
          ) {
      Severity: Major
      Found in packages/backend/db-migration/prisma/seed/card.ts and 3 other locations - About 1 hr to fix
      packages/backend/db-migration/prisma/seed/card.ts on lines 81..88
      packages/backend/db-migration/prisma/seed/card.ts on lines 97..104
      packages/backend/db-migration/prisma/seed/card.ts on lines 105..112

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

      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

          if (
            errors.find((e: any) =>
              e.message.startsWith("No Node for the model SuperType with value")
            )
          ) {
      Severity: Major
      Found in packages/backend/db-migration/prisma/seed/card.ts and 3 other locations - About 1 hr to fix
      packages/backend/db-migration/prisma/seed/card.ts on lines 81..88
      packages/backend/db-migration/prisma/seed/card.ts on lines 89..96
      packages/backend/db-migration/prisma/seed/card.ts on lines 97..104

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

      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