trufflesuite/truffle

View on GitHub

Showing 716 of 1,401 total issues

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

export const { StringValue } = createCodecComponent(
  "StringValue",
  ({ value }: Format.Values.StringValue) => <StringValueInfo data={value} />
);
packages/codec-components/src/react/components/codec/format.errors.internal-function-in-abi-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.re-encoding-mismatch-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.unused-immutable-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.wrapped-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.values.contract-value.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.values.function-external-value.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.values.function-internal-value.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.values.options-value.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-value.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 58.

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

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

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

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

Refactorings

Further Reading

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

export const { ContractValue } = createCodecComponent(
  "ContractValue",
  ({ value }: Format.Values.ContractValue) => <ContractValueInfo data={value} />
);
packages/codec-components/src/react/components/codec/format.errors.internal-function-in-abi-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.re-encoding-mismatch-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.unused-immutable-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.wrapped-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.values.function-external-value.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.values.function-internal-value.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.values.options-value.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.values.string-value.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-value.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 58.

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

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

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

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

Refactorings

Further Reading

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

export const { InternalFunctionInABIError } = createCodecComponent(
  "InternalFunctionInABIError",
  ({ kind }: Format.Errors.InternalFunctionInABIError) => (
    <CodecError kind={kind} />
  )
packages/codec-components/src/react/components/codec/format.errors.re-encoding-mismatch-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.unused-immutable-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.wrapped-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.values.contract-value.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.values.function-external-value.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.values.function-internal-value.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.values.options-value.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.values.string-value.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-value.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 58.

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

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

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

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

Refactorings

Further Reading

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

export const { UserDefinedValueTypeValue } = createCodecComponent(
  "UserDefinedValueTypeValue",
  ({ value }: Format.Values.UserDefinedValueTypeValue) => (
    <BuiltInValueValue data={value} />
  )
packages/codec-components/src/react/components/codec/format.errors.internal-function-in-abi-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.re-encoding-mismatch-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.unused-immutable-error.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.errors.wrapped-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.values.contract-value.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.values.function-external-value.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.values.function-internal-value.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.values.options-value.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.values.string-value.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 58.

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

      border:
        colorScheme === "dark"
          ? `1px solid ${colors["truffle-brown"][5]}`
          : `1px solid ${fn.lighten(colors["truffle-beige"][5], 0.3)}`
packages/dashboard/src/components/composed/RPCs/RPC/index.tsx on lines 25..28

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

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

      outline:
        colorScheme === "dark"
          ? `0.5px solid ${colors["truffle-brown"][5]}`
          : `0.5px solid ${fn.rgba(colors["truffle-beige"][5], 0.45)}`
packages/dashboard/src/components/composed/Sidebar/Bottom/MenuButton/index.tsx on lines 22..25

Duplicated Code

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

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

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

Tuning

This issue has a mass of 58.

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 type AdapterDatabases<
    A extends Adapters = Adapters,
    N extends AdapterName<A> = AdapterName<A>
  > = Adapter<A, N>["databases"];
Severity: Major
Found in packages/db/src/meta/pouch/adapters/types.ts and 1 other location - About 1 hr to fix
packages/db/src/meta/pouch/adapters/types.ts on lines 25..28

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

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

    ? ({
        reverseRelationship: "descendant",
        superlativeOption: "onlyEarliest",
        heightBoundOption: "minimumHeight",
        heightBoundComparison: "$gte",
Severity: Major
Found in packages/db/src/resources/networks/resolveRelations.ts and 1 other location - About 1 hr to fix
packages/db/src/resources/networks/resolveRelations.ts on lines 166..172

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

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

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

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

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

Refactorings

Further Reading

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

export const { UnusedImmutableError } = createCodecComponent(
  "UnusedImmutableError",
  ({ kind }: Format.Errors.UnusedImmutableError) => <CodecError kind={kind} />
);
packages/codec-components/src/react/components/codec/format.errors.internal-function-in-abi-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.re-encoding-mismatch-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.errors.wrapped-error.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.values.contract-value.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.values.function-external-value.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.values.function-internal-value.tsx on lines 6..11
packages/codec-components/src/react/components/codec/format.values.options-value.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.values.string-value.tsx on lines 6..9
packages/codec-components/src/react/components/codec/format.values.user-defined-value-type-value.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 58.

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 type AdapterSettings<
    A extends Adapters = Adapters,
    N extends AdapterName<A> = AdapterName<A>
  > = Adapter<A, N>["settings"];
Severity: Major
Found in packages/db/src/meta/pouch/adapters/types.ts and 1 other location - About 1 hr to fix
packages/db/src/meta/pouch/adapters/types.ts on lines 20..23

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

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

    : ({
        reverseRelationship: "ancestor",
        superlativeOption: "onlyLatest",
        heightBoundOption: "maximumHeight",
        heightBoundComparison: "$gte",
Severity: Major
Found in packages/db/src/resources/networks/resolveRelations.ts and 1 other location - About 1 hr to fix
packages/db/src/resources/networks/resolveRelations.ts on lines 159..165

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

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

  contractName: {
    get: function () {
      return this._json.contractName || "Contract";
    },
    set: function (val) {
Severity: Major
Found in packages/contract/lib/contract/properties.js and 1 other location - About 1 hr to fix
packages/contract/lib/contract/properties.js on lines 372..379

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

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

  networkType: {
    get: function () {
      return this._json.networkType || "ethereum";
    },
    set: function (_networkType) {
Severity: Major
Found in packages/contract/lib/contract/properties.js and 1 other location - About 1 hr to fix
packages/contract/lib/contract/properties.js on lines 13..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 57.

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

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

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

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

Refactorings

Further Reading

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

        {
          name: "a",
          type: "tuple",
          internalType: "struct Contract.Struct1",
          components: [
Severity: Major
Found in packages/abi-utils/lib/signature.test.ts and 3 other locations - About 1 hr to fix
packages/abi-utils/lib/signature.test.ts on lines 112..128
packages/abi-utils/lib/signature.test.ts on lines 146..162
packages/abi-utils/lib/signature.test.ts on lines 163..179

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

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

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

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

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

Refactorings

Further Reading

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

            {
              name: "ab",
              type: "tuple",
              internalType: "struct Contract.Struct3",
              components: [
Severity: Major
Found in packages/abi-utils/lib/signature.test.ts and 3 other locations - About 1 hr to fix
packages/abi-utils/lib/signature.test.ts on lines 84..100
packages/abi-utils/lib/signature.test.ts on lines 146..162
packages/abi-utils/lib/signature.test.ts on lines 163..179

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

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

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

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

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

Refactorings

Further Reading

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

        {
          name: "a",
          type: "tuple[2][][2]",
          internalType: "struct Contract.Struct1",
          components: [
Severity: Major
Found in packages/abi-utils/lib/signature.test.ts and 3 other locations - About 1 hr to fix
packages/abi-utils/lib/signature.test.ts on lines 84..100
packages/abi-utils/lib/signature.test.ts on lines 112..128
packages/abi-utils/lib/signature.test.ts on lines 163..179

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

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

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

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

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

Refactorings

Further Reading

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

        {
          name: "b",
          type: "tuple[][2][]",
          internalType: "struct Contract.Struct1",
          components: [
Severity: Major
Found in packages/abi-utils/lib/signature.test.ts and 3 other locations - About 1 hr to fix
packages/abi-utils/lib/signature.test.ts on lines 84..100
packages/abi-utils/lib/signature.test.ts on lines 112..128
packages/abi-utils/lib/signature.test.ts on lines 146..162

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

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

      asrtNoReason: () =>
        `${prefix}"${data.contract.contractName}" hit an invalid opcode while deploying. Try:\n` +
        `   * Verifying that your constructor params satisfy all assert conditions.\n` +
        `   * Verifying your constructor code doesn't access an array out of bounds.\n` +
        `   * Adding reason strings to your assert statements.\n`,
Severity: Major
Found in packages/events/defaultSubscribers/migrate/Messages.js and 1 other location - About 1 hr to fix
packages/events/defaultSubscribers/migrate/Messages.js on lines 94..98

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

      rvtNoReason: () =>
        `${prefix}"${data.contract.contractName}" hit a require or revert statement ` +
        `somewhere in its constructor. Try:\n` +
        `   * Verifying that your constructor params satisfy all require conditions.\n` +
        `   * Adding reason strings to your require statements.\n`,
Severity: Major
Found in packages/events/defaultSubscribers/migrate/Messages.js and 1 other location - About 1 hr to fix
packages/events/defaultSubscribers/migrate/Messages.js on lines 100..104

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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 isErrorResult = (
  data: Format.Values.Result
): data is Format.Errors.ErrorResult => data.kind === "error";
packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

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