trufflesuite/truffle

View on GitHub

Showing 1,401 of 1,401 total issues

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

    } else if (
      this.getUserConfig().get("analyticsSet") &&
      !this.getUserConfig().get("enableAnalytics") &&
      process.stdin.isTTY === true
    ) {
Severity: Major
Found in packages/core/lib/commands/config/utils.js and 1 other location - About 1 hr to fix
packages/core/lib/commands/config/utils.js on lines 97..119

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

        `${prefix}"${data.contract.contractName}" ` +
        `is an abstract contract or an interface and cannot be deployed.\n` +
        `   * Import abstractions into the '.sol' file that uses them instead of deploying them separately.\n` +
        `   * Contracts that inherit an abstraction must implement all its method signatures exactly.\n` +
        `   * A contract that only implements part of an inherited abstraction is also considered abstract.\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 81..85

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

    } else if (
      this.getUserConfig().get("analyticsSet") &&
      this.getUserConfig().get("enableAnalytics") &&
      process.stdin.isTTY === true
    ) {
Severity: Major
Found in packages/core/lib/commands/config/utils.js and 1 other location - About 1 hr to fix
packages/core/lib/commands/config/utils.js on lines 108..119

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 { WrappedError } = createCodecComponent(
  "WrappedError",
  ({ error }: Format.Errors.WrappedError) => (
    <BuiltInValueErrorResult data={error} />
  )
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.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 { FunctionExternalValue } = createCodecComponent(
  "FunctionExternalValue",
  ({ value }: Format.Values.FunctionExternalValue) => (
    <FunctionExternalValueInfo 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-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 { OptionsValue } = createCodecComponent(
  "OptionsValue",
  ({ value }: Format.Values.OptionsValue) => <Options 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.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 { FunctionInternalValue } = createCodecComponent(
  "FunctionInternalValue",
  ({ value }: Format.Values.FunctionInternalValue) => (
    <FunctionInternalValueInfo 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.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 { ReEncodingMismatchError } = createCodecComponent(
  "ReEncodingMismatchError",
  ({ kind }: Format.Errors.ReEncodingMismatchError) => (
    <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.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 { 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

Function create has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

  pointer,
  newPointer,
  step,
  address,
  context,
Severity: Major
Found in packages/debugger/lib/txlog/actions/index.js - About 1 hr to fix
    Severity
    Category
    Status
    Source
    Language