trufflesuite/truffle

View on GitHub

Showing 1,401 of 1,401 total issues

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

  {
    type: "codec-interface",
    name: "UnknownCreationDecoding",
    content: (
      <>
Severity: Major
Found in packages/codec-components/src/docs/content.tsx and 5 other locations - About 2 hrs to fix
packages/codec-components/src/docs/content.tsx on lines 25..35
packages/codec-components/src/docs/content.tsx on lines 36..46
packages/codec-components/src/docs/content.tsx on lines 173..185
packages/codec-components/src/docs/content.tsx on lines 186..196
packages/codec-components/src/docs/content.tsx on lines 389..403

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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

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

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

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

Refactorings

Further Reading

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

  {
    type: "codec-interface",
    name: "BytecodeDecoding",
    content: (
      <>
Severity: Major
Found in packages/codec-components/src/docs/content.tsx and 5 other locations - About 2 hrs to fix
packages/codec-components/src/docs/content.tsx on lines 25..35
packages/codec-components/src/docs/content.tsx on lines 173..185
packages/codec-components/src/docs/content.tsx on lines 186..196
packages/codec-components/src/docs/content.tsx on lines 197..209
packages/codec-components/src/docs/content.tsx on lines 389..403

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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

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

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

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

Refactorings

Further Reading

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

    web3.eth.getTransactionReceipt.method.outputFormatter = (receipt: any) => {
      const _oldGasUsed = receipt.gasUsed;

      receipt.gasUsed = "0x0";

Severity: Major
Found in packages/interface-adapter/lib/shim/overloads/quorum.ts and 1 other location - About 2 hrs to fix
packages/interface-adapter/lib/shim/overloads/quorum.ts on lines 63..79

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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

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

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

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

Refactorings

Further Reading

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

  {
    type: "codec-interface",
    name: "UnknownBytecodeDecoding",
    content: (
      <>
Severity: Major
Found in packages/codec-components/src/docs/content.tsx and 5 other locations - About 2 hrs to fix
packages/codec-components/src/docs/content.tsx on lines 25..35
packages/codec-components/src/docs/content.tsx on lines 36..46
packages/codec-components/src/docs/content.tsx on lines 186..196
packages/codec-components/src/docs/content.tsx on lines 197..209
packages/codec-components/src/docs/content.tsx on lines 389..403

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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

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

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

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

Refactorings

Further Reading

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

  {
    type: "codec-interface",
    name: "UnknownCallDecoding",
    content: (
      <>
Severity: Major
Found in packages/codec-components/src/docs/content.tsx and 5 other locations - About 2 hrs to fix
packages/codec-components/src/docs/content.tsx on lines 25..35
packages/codec-components/src/docs/content.tsx on lines 36..46
packages/codec-components/src/docs/content.tsx on lines 173..185
packages/codec-components/src/docs/content.tsx on lines 197..209
packages/codec-components/src/docs/content.tsx on lines 389..403

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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

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

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

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

Refactorings

Further Reading

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

  {
    type: "codec-interface",
    name: "AnonymousDecoding",
    content: (
      <>
Severity: Major
Found in packages/codec-components/src/docs/content.tsx and 5 other locations - About 2 hrs to fix
packages/codec-components/src/docs/content.tsx on lines 36..46
packages/codec-components/src/docs/content.tsx on lines 173..185
packages/codec-components/src/docs/content.tsx on lines 186..196
packages/codec-components/src/docs/content.tsx on lines 197..209
packages/codec-components/src/docs/content.tsx on lines 389..403

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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

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

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

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

Refactorings

Further Reading

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

  {
    type: "codec-interface",
    name: "Format.Values.StringValueInfoMalformed",
    content: (
      <>
Severity: Major
Found in packages/codec-components/src/docs/content.tsx and 5 other locations - About 2 hrs to fix
packages/codec-components/src/docs/content.tsx on lines 25..35
packages/codec-components/src/docs/content.tsx on lines 36..46
packages/codec-components/src/docs/content.tsx on lines 173..185
packages/codec-components/src/docs/content.tsx on lines 186..196
packages/codec-components/src/docs/content.tsx on lines 197..209

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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

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

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

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

Refactorings

Further Reading

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

    web3.eth.getTransaction.method.outputFormatter = (tx: EvmTransaction) => {
      const _oldGas = tx.gas;

      tx.gas = "0x0";

Severity: Major
Found in packages/interface-adapter/lib/shim/overloads/quorum.ts and 1 other location - About 2 hrs to fix
packages/interface-adapter/lib/shim/overloads/quorum.ts on lines 88..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 76.

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

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

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

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

Refactorings

Further Reading

Function generateReport has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function generateReport(rawStack, location, status, message) {
  //step 1: process combined frames
  let callstack = [];
  //we're doing a C-style loop here!
  //because we want to skip some items <grin>
Severity: Major
Found in packages/debugger/lib/stacktrace/selectors/index.js - About 2 hrs to fix

    Function exports has 51 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = async function (options) {
      const Config = require("@truffle/config");
      const TruffleError = require("@truffle/error");
      const WorkflowCompile = require("@truffle/workflow-compile").default;
      const CodeUtils = require("@truffle/code-utils");
    Severity: Major
    Found in packages/core/lib/commands/opcode/run.js - About 2 hrs to fix

      Function evalAndPrintExpression has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        async evalAndPrintExpression(raw, indent, suppress) {
          let variables = await this.session.variables({ indicateUnknown: true });
      
          //if we're just dealing with a single variable, handle that case
          //separately (so that we can do things in a better way for that
      Severity: Major
      Found in packages/core/lib/debug/printer.js - About 2 hrs to fix

        File index.js has 251 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import debugModule from "debug";
        const debug = debugModule("debugger:stacktrace:selectors");
        
        import { createSelectorTree, createLeaf } from "reselect-tree";
        
        
        Severity: Minor
        Found in packages/debugger/lib/stacktrace/selectors/index.js - About 2 hrs to fix

          Function decodeReturnValue has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function* decodeReturnValue() {
            const userDefinedTypes = yield select(data.views.userDefinedTypes);
            const state = yield select(data.next.state); //next state has the return data
            const allocations = yield select(data.info.allocations);
            const contexts = yield select(data.views.contexts);
          Severity: Minor
          Found in packages/debugger/lib/data/sagas/index.js - About 2 hrs to fix

            Consider simplifying this complex logical expression.
            Open

                } else if (
                  decoding.kind === "function" &&
                  decoding.abi.name === "aggregate3Value" &&
                  decoding.abi.inputs.length === 1 &&
                  decoding.abi.inputs[0].type === "tuple[]" &&
            Severity: Critical
            Found in packages/decoder/lib/decoders.ts - About 2 hrs to fix

              Function resolvers has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                get resolvers(): IResolvers<any, Context<C>> {
                  const log = debug.extend(`${this.resource}:resolvers`);
                  log("Generating...");
              
                  // setup loggers for specific resolvers
              Severity: Minor
              Found in packages/db/src/meta/graph/schema.ts - About 2 hrs to fix

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

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

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 75.

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

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

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

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

                Refactorings

                Further Reading

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

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

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 75.

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

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

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

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

                Refactorings

                Further Reading

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

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

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 75.

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

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

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

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

                Refactorings

                Further Reading

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

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

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 75.

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

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

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

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

                Refactorings

                Further Reading

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

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

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 75.

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

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

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

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

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language