trufflesuite/truffle

View on GitHub

Showing 716 of 1,401 total issues

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

export const { FunctionInternalResult } = createCodecComponent(
  "FunctionInternalResult",
  (data: Format.Values.FunctionInternalResult) =>
    isFunctionInternalValue(data) ? (
      <FunctionInternalValue data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.error-for-throwing.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.address-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.enum-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.fixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-external-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

export const { FunctionInternalRawInfo } = createCodecComponent(
  "FunctionInternalRawInfo",
  (data: Format.Values.FunctionInternalRawInfo) =>
    isFunctionInternalRawInfoPcPair(data) ? (
      <FunctionInternalRawInfoPcPair data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.error-for-throwing.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.address-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.enum-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.fixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-external-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

export const { IntResult } = createCodecComponent(
  "IntResult",
  (data: Format.Values.IntResult) =>
    isIntValue(data) ? <IntValue data={data} /> : <IntErrorResult data={data} />
);
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.error-for-throwing.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.address-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.enum-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.fixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-external-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

export const { FunctionExternalResult } = createCodecComponent(
  "FunctionExternalResult",
  (data: Format.Values.FunctionExternalResult) =>
    isFunctionExternalValue(data) ? (
      <FunctionExternalValue data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.error-for-throwing.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.address-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.enum-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.fixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

export const { ContractResult } = createCodecComponent(
  "ContractResult",
  (data: Format.Values.ContractResult) =>
    isContractValue(data) ? (
      <ContractValue data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.error-for-throwing.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.address-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.enum-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.fixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-external-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

export const { FixedResult } = createCodecComponent(
  "FixedResult",
  (data: Format.Values.FixedResult) =>
    isFixedValue(data) ? (
      <FixedValue data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.error-for-throwing.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.address-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.enum-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-external-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

export const { TypeResult } = createCodecComponent(
  "TypeResult",
  (data: Format.Values.TypeResult) =>
    isTypeValue(data) ? (
      <TypeValue data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.error-for-throwing.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.address-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.enum-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.fixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-external-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

export const { ErrorForThrowing } = createCodecComponent(
  "ErrorForThrowing",
  (data: Format.Errors.ErrorForThrowing) =>
    isUserDefinedTypeNotFoundError(data) ? (
      <UserDefinedTypeNotFoundError data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.address-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.enum-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.fixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-external-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

export const { EnumResult } = createCodecComponent(
  "EnumResult",
  (data: Format.Values.EnumResult) =>
    isEnumValue(data) ? (
      <EnumValue data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.error-for-throwing.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.address-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.fixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-external-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

export const { AddressResult } = createCodecComponent(
  "AddressResult",
  (data: Format.Values.AddressResult) =>
    isAddressValue(data) ? (
      <AddressValue data={data} />
packages/codec-components/src/react/components/codec/format.errors.bool-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.bytes-error-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.dynamic-data-implementation-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.error-for-throwing.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.errors.function-external-error.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.array-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bool-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-dynamic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-static-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.bytes-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.contract-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.enum-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.fixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-external-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-raw-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.function-internal-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.int-result.tsx on lines 8..12
packages/codec-components/src/react/components/codec/format.values.magic-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.mapping-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.options-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.string-value-info.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.struct-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.tuple-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.type-value.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.ufixed-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.uint-result.tsx on lines 8..16
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-result.tsx on lines 8..16

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

  public async encodeTransaction(
    abisOrNameOrSig: Abi.FunctionEntry[] | string,
    inputs: unknown[],
    options: Types.ResolveOptions = {}
  ): Promise<Types.TxAndAbi> {
Severity: Major
Found in packages/encoder/lib/encoders.ts and 1 other location - About 2 hrs to fix
packages/encoder/lib/encoders.ts on lines 917..929

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

  public async resolveAndWrap(
    abisOrNameOrSig: Abi.FunctionEntry[] | string,
    inputs: unknown[],
    options: Types.ResolveOptions = {}
  ): Promise<Codec.Wrap.Resolution> {
Severity: Major
Found in packages/encoder/lib/encoders.ts and 1 other location - About 2 hrs to fix
packages/encoder/lib/encoders.ts on lines 1283..1299

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

  deployedSourceMap: {
    transform: function (value) {
      if (typeof value === "string") {
        try {
          return JSON.parse(value);
Severity: Major
Found in packages/contract-schema/index.js and 1 other location - About 1 hr to fix
packages/contract-schema/index.js on lines 109..122

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

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

  sourceMap: {
    transform: function (value) {
      if (typeof value === "string") {
        try {
          return JSON.parse(value);
Severity: Major
Found in packages/contract-schema/index.js and 1 other location - About 1 hr to fix
packages/contract-schema/index.js on lines 123..140

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

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 const { UserDefinedTypeNotFoundError } = createCodecComponent(
  "UserDefinedTypeNotFoundError",
  ({ kind, type }: Format.Errors.UserDefinedTypeNotFoundError) => (
    <CodecError kind={kind}>{type.typeName}</CodecError>
  )
packages/codec-components/src/react/components/codec/format.errors.unsupported-constant-error.tsx on lines 6..11

Duplicated Code

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

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

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

Tuning

This issue has a mass of 74.

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 forDeployedArtifact(
  artifact: Artifact,
  settings: DecoderSettings
): Promise<ContractInstanceDecoder> {
  let contractDecoder = await forArtifact(artifact, settings);
Severity: Major
Found in packages/decoder/lib/index.ts and 1 other location - About 1 hr to fix
packages/encoder/lib/index.ts on lines 283..290

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

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 forDeployedArtifact(
  artifact: Artifact,
  settings: EncoderSettings
): Promise<ContractInstanceEncoder> {
  let contractEncoder = await forArtifact(artifact, settings);
Severity: Major
Found in packages/encoder/lib/index.ts and 1 other location - About 1 hr to fix
packages/decoder/lib/index.ts on lines 265..272

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

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 const { UnsupportedConstantError } = createCodecComponent(
  "UnsupportedConstantError",
  ({ kind, definition }: Format.Errors.UnsupportedConstantError) => (
    <CodecError kind={kind}>{definition.name}</CodecError>
  )
packages/codec-components/src/react/components/codec/format.errors.user-defined-type-not-found-error.tsx on lines 6..11

Duplicated Code

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

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

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

Tuning

This issue has a mass of 74.

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

module.exports = {
  moduleFileExtensions: ["ts", "js", "json", "node"],
  testEnvironment: "node",
  transform: {
    "^.+\\.ts$": "ts-jest"
Severity: Major
Found in packages/preserve/jest.config.js and 1 other location - About 1 hr to fix
packages/dashboard/jest.config.js on lines 1..20

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

module.exports = {
  moduleFileExtensions: ["ts", "js", "json", "node"],
  testEnvironment: "node",
  transform: {
    "^.+\\.ts$": "ts-jest"
Severity: Major
Found in packages/dashboard/jest.config.js and 1 other location - About 1 hr to fix
packages/preserve/jest.config.js on lines 1..20

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

Severity
Category
Status
Source
Language