trufflesuite/truffle

View on GitHub

Showing 716 of 1,401 total issues

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

      yield put(
        actions.mapPathAndAssign(
          address,
          slot,
          assignments,
Severity: Minor
Found in packages/debugger/lib/data/sagas/index.js and 1 other location - About 50 mins to fix
packages/debugger/lib/data/sagas/index.js on lines 617..625

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

        yield put(
          actions.mapPathAndAssign(
            address,
            slot,
            assignments,
Severity: Minor
Found in packages/debugger/lib/data/sagas/index.js and 1 other location - About 50 mins to fix
packages/debugger/lib/data/sagas/index.js on lines 712..720

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

const logWeb3 = (logger = console) => {
  const web3Version = pkg.dependencies.web3;
  logger.log(`Web3.js v${web3Version}`);
};
Severity: Minor
Found in packages/core/lib/version.js and 1 other location - About 50 mins to fix
packages/core/lib/version.js on lines 63..66

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

export const { FixedError } = createCodecComponent(
  "FixedError",
  (data: Format.Errors.FixedError) => <FixedPaddingError data={data} />
);
packages/codec-components/src/react/components/codec/format.errors.address-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.array-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-dynamic-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-static-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.contract-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.int-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.string-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.struct-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.tuple-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.ufixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.uint-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.user-defined-value-type-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 52.

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

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

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

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

Refactorings

Further Reading

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

export const { ArrayError } = createCodecComponent(
  "ArrayError",
  (data: Format.Errors.ArrayError) => (
    <DynamicDataImplementationError data={data} />
  )
packages/codec-components/src/react/components/codec/format.errors.address-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.bytes-dynamic-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-static-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.contract-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.fixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.int-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.string-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.struct-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.tuple-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.ufixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.uint-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.user-defined-value-type-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 52.

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

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

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

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

Refactorings

Further Reading

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

export const { ContractError } = createCodecComponent(
  "ContractError",
  (data: Format.Errors.ContractError) => <ContractPaddingError data={data} />
);
packages/codec-components/src/react/components/codec/format.errors.address-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.array-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-dynamic-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-static-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.fixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.int-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.string-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.struct-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.tuple-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.ufixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.uint-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.user-defined-value-type-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 52.

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

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

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

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

Refactorings

Further Reading

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

export const { UintError } = createCodecComponent(
  "UintError",
  (data: Format.Errors.UintError) => <UintPaddingError data={data} />
);
packages/codec-components/src/react/components/codec/format.errors.address-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.array-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-dynamic-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-static-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.contract-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.fixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.int-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.string-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.struct-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.tuple-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.ufixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.user-defined-value-type-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 52.

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

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

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

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

Refactorings

Further Reading

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

export const { StructError } = createCodecComponent(
  "StructError",
  (data: Format.Errors.StructError) => (
    <DynamicDataImplementationError data={data} />
  )
packages/codec-components/src/react/components/codec/format.errors.address-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.array-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-dynamic-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-static-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.contract-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.fixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.int-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.string-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.tuple-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.ufixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.uint-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.user-defined-value-type-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 52.

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

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

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

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

Refactorings

Further Reading

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

export const { BytesDynamicError } = createCodecComponent(
  "BytesDynamicError",
  (data: Format.Errors.BytesDynamicError) => (
    <DynamicDataImplementationError data={data} />
  )
packages/codec-components/src/react/components/codec/format.errors.address-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.array-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-static-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.contract-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.fixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.int-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.string-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.struct-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.tuple-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.ufixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.uint-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.user-defined-value-type-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 52.

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

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

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

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

Refactorings

Further Reading

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

export const { IntError } = createCodecComponent(
  "IntError",
  (data: Format.Errors.IntError) => <IntPaddingError data={data} />
);
packages/codec-components/src/react/components/codec/format.errors.address-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.array-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-dynamic-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-static-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.contract-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.fixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.string-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.struct-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.tuple-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.ufixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.uint-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.user-defined-value-type-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 52.

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

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

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

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

Refactorings

Further Reading

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

export const { AddressError } = createCodecComponent(
  "AddressError",
  (data: Format.Errors.AddressError) => <AddressPaddingError data={data} />
);
packages/codec-components/src/react/components/codec/format.errors.array-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-dynamic-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-static-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.contract-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.fixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.int-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.string-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.struct-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.tuple-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.ufixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.uint-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.user-defined-value-type-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 52.

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

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

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

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

Refactorings

Further Reading

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

export const { BytesStaticError } = createCodecComponent(
  "BytesStaticError",
  (data: Format.Errors.BytesStaticError) => <BytesPaddingError data={data} />
);
packages/codec-components/src/react/components/codec/format.errors.address-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.array-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-dynamic-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.contract-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.fixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.int-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.string-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.struct-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.tuple-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.ufixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.uint-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.user-defined-value-type-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 52.

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

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

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

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

Refactorings

Further Reading

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

export const { StringError } = createCodecComponent(
  "StringError",
  (data: Format.Errors.StringError) => (
    <DynamicDataImplementationError data={data} />
  )
packages/codec-components/src/react/components/codec/format.errors.address-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.array-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-dynamic-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-static-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.contract-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.fixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.int-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.struct-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.tuple-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.ufixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.uint-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.user-defined-value-type-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 52.

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

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

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

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

Refactorings

Further Reading

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

const logGanache = (logger = console) => {
  const ganacheVersion = pkg.dependencies.ganache;
  logger.log(`Ganache v${ganacheVersion}`);
};
Severity: Minor
Found in packages/core/lib/version.js and 1 other location - About 50 mins to fix
packages/core/lib/version.js on lines 58..61

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

export const { TupleError } = createCodecComponent(
  "TupleError",
  (data: Format.Errors.TupleError) => (
    <DynamicDataImplementationError data={data} />
  )
packages/codec-components/src/react/components/codec/format.errors.address-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.array-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-dynamic-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-static-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.contract-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.fixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.int-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.string-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.struct-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.ufixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.uint-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.user-defined-value-type-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 52.

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

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

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

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

Refactorings

Further Reading

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

export const { UserDefinedValueTypeError } = createCodecComponent(
  "UserDefinedValueTypeError",
  (data: Format.Errors.UserDefinedValueTypeError) => (
    <WrappedError data={data} />
  )
packages/codec-components/src/react/components/codec/format.errors.address-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.array-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-dynamic-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-static-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.contract-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.fixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.int-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.string-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.struct-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.tuple-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.ufixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.uint-error.tsx on lines 6..9

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

export const { UfixedError } = createCodecComponent(
  "UfixedError",
  (data: Format.Errors.UfixedError) => <UfixedPaddingError data={data} />
);
packages/codec-components/src/react/components/codec/format.errors.address-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.array-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-dynamic-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.bytes-static-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.contract-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.fixed-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.int-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.string-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.struct-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.tuple-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.uint-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.user-defined-value-type-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 52.

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

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

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

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

Refactorings

Further Reading

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

export interface StringValue {
  type: Types.StringType;
  kind: "value";
  value: StringValueInfo;
  interpretations: {};
Severity: Major
Found in packages/codec/lib/format/elementary.ts and 2 other locations - About 50 mins to fix
packages/codec/lib/format/elementary.ts on lines 239..244
packages/codec/lib/format/values.ts on lines 534..539

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

export interface UserDefinedValueTypeValue {
  type: Types.UserDefinedValueTypeType;
  kind: "value";
  value: BuiltInValueValue;
  interpretations: {};
Severity: Major
Found in packages/codec/lib/format/elementary.ts and 2 other locations - About 50 mins to fix
packages/codec/lib/format/elementary.ts on lines 149..154
packages/codec/lib/format/values.ts on lines 534..539

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

      const constructorArgs = await this.requestWithRetries<string>({
        url: `https://${this.domain}/contracts/${matchType}_match/${this.networkId}/${address}/constructor-args.txt`,
        method: "get",
        responseType: "text",
        maxRedirects: 50
Severity: Minor
Found in packages/source-fetcher/lib/sourcify.ts and 1 other location - About 50 mins to fix
packages/source-fetcher/lib/sourcify.ts on lines 252..257

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language