trufflesuite/truffle

View on GitHub
packages/codec/lib/format/errors.ts

Summary

Maintainability
D
2 days
Test Coverage

File errors.ts has 394 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Contains the types for error and `ErrorResult` objects.
 * @category Main Format
 *
 * @packageDocumentation
Severity: Minor
Found in packages/codec/lib/format/errors.ts - About 5 hrs to fix

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

    export interface OptionsErrorResult {
      type: Types.OptionsType;
      kind: "error";
      error: GenericError | OptionsError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 4 other locations - About 45 mins to fix
    packages/codec/lib/format/errors.ts on lines 415..419
    packages/codec/lib/format/errors.ts on lines 538..542
    packages/codec/lib/format/errors.ts on lines 651..655
    packages/codec/lib/format/errors.ts on lines 706..710

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

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

    export interface EnumErrorResult {
      type: Types.EnumType;
      kind: "error";
      error: GenericError | EnumError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 4 other locations - About 45 mins to fix
    packages/codec/lib/format/errors.ts on lines 538..542
    packages/codec/lib/format/errors.ts on lines 651..655
    packages/codec/lib/format/errors.ts on lines 706..710
    packages/codec/lib/format/errors.ts on lines 782..786

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

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

    export interface FunctionExternalErrorResult {
      type: Types.FunctionExternalType;
      kind: "error";
      error: GenericError | FunctionExternalError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 4 other locations - About 45 mins to fix
    packages/codec/lib/format/errors.ts on lines 415..419
    packages/codec/lib/format/errors.ts on lines 538..542
    packages/codec/lib/format/errors.ts on lines 706..710
    packages/codec/lib/format/errors.ts on lines 782..786

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

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

    export interface ArrayErrorResult {
      type: Types.ArrayType;
      kind: "error";
      error: GenericError | ArrayError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 4 other locations - About 45 mins to fix
    packages/codec/lib/format/errors.ts on lines 415..419
    packages/codec/lib/format/errors.ts on lines 651..655
    packages/codec/lib/format/errors.ts on lines 706..710
    packages/codec/lib/format/errors.ts on lines 782..786

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

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

    export interface FunctionInternalErrorResult {
      type: Types.FunctionInternalType;
      kind: "error";
      error: GenericError | FunctionInternalError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 4 other locations - About 45 mins to fix
    packages/codec/lib/format/errors.ts on lines 415..419
    packages/codec/lib/format/errors.ts on lines 538..542
    packages/codec/lib/format/errors.ts on lines 651..655
    packages/codec/lib/format/errors.ts on lines 782..786

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

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

    export interface TupleErrorResult {
      type: Types.TupleType;
      kind: "error";
      error: GenericError | TupleError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 142..146
    packages/codec/lib/format/errors.ts on lines 174..178
    packages/codec/lib/format/errors.ts on lines 206..210
    packages/codec/lib/format/errors.ts on lines 248..252
    packages/codec/lib/format/errors.ts on lines 280..284
    packages/codec/lib/format/errors.ts on lines 298..302
    packages/codec/lib/format/errors.ts on lines 330..334
    packages/codec/lib/format/errors.ts on lines 348..352
    packages/codec/lib/format/errors.ts on lines 358..362
    packages/codec/lib/format/errors.ts on lines 473..477
    packages/codec/lib/format/errors.ts on lines 502..506
    packages/codec/lib/format/errors.ts on lines 556..560
    packages/codec/lib/format/errors.ts on lines 574..578
    packages/codec/lib/format/errors.ts on lines 610..614
    packages/codec/lib/format/errors.ts on lines 628..632

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

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

    export interface BytesDynamicErrorResult {
      type: Types.BytesTypeDynamic;
      kind: "error";
      error: GenericError | BytesDynamicError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 142..146
    packages/codec/lib/format/errors.ts on lines 174..178
    packages/codec/lib/format/errors.ts on lines 206..210
    packages/codec/lib/format/errors.ts on lines 248..252
    packages/codec/lib/format/errors.ts on lines 298..302
    packages/codec/lib/format/errors.ts on lines 330..334
    packages/codec/lib/format/errors.ts on lines 348..352
    packages/codec/lib/format/errors.ts on lines 358..362
    packages/codec/lib/format/errors.ts on lines 473..477
    packages/codec/lib/format/errors.ts on lines 502..506
    packages/codec/lib/format/errors.ts on lines 556..560
    packages/codec/lib/format/errors.ts on lines 574..578
    packages/codec/lib/format/errors.ts on lines 592..596
    packages/codec/lib/format/errors.ts on lines 610..614
    packages/codec/lib/format/errors.ts on lines 628..632

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

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

    export interface MappingErrorResult {
      type: Types.MappingType;
      kind: "error";
      error: GenericError | MappingError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 142..146
    packages/codec/lib/format/errors.ts on lines 174..178
    packages/codec/lib/format/errors.ts on lines 206..210
    packages/codec/lib/format/errors.ts on lines 248..252
    packages/codec/lib/format/errors.ts on lines 280..284
    packages/codec/lib/format/errors.ts on lines 298..302
    packages/codec/lib/format/errors.ts on lines 330..334
    packages/codec/lib/format/errors.ts on lines 348..352
    packages/codec/lib/format/errors.ts on lines 358..362
    packages/codec/lib/format/errors.ts on lines 473..477
    packages/codec/lib/format/errors.ts on lines 502..506
    packages/codec/lib/format/errors.ts on lines 574..578
    packages/codec/lib/format/errors.ts on lines 592..596
    packages/codec/lib/format/errors.ts on lines 610..614
    packages/codec/lib/format/errors.ts on lines 628..632

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

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

    export interface UserDefinedValueTypeErrorResult {
      type: Types.UserDefinedValueTypeType;
      kind: "error";
      error: GenericError | UserDefinedValueTypeError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 142..146
    packages/codec/lib/format/errors.ts on lines 174..178
    packages/codec/lib/format/errors.ts on lines 206..210
    packages/codec/lib/format/errors.ts on lines 248..252
    packages/codec/lib/format/errors.ts on lines 280..284
    packages/codec/lib/format/errors.ts on lines 298..302
    packages/codec/lib/format/errors.ts on lines 330..334
    packages/codec/lib/format/errors.ts on lines 348..352
    packages/codec/lib/format/errors.ts on lines 358..362
    packages/codec/lib/format/errors.ts on lines 502..506
    packages/codec/lib/format/errors.ts on lines 556..560
    packages/codec/lib/format/errors.ts on lines 574..578
    packages/codec/lib/format/errors.ts on lines 592..596
    packages/codec/lib/format/errors.ts on lines 610..614
    packages/codec/lib/format/errors.ts on lines 628..632

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

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

    export interface ContractErrorResult {
      type: Types.ContractType;
      kind: "error";
      error: GenericError | ContractError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 142..146
    packages/codec/lib/format/errors.ts on lines 174..178
    packages/codec/lib/format/errors.ts on lines 206..210
    packages/codec/lib/format/errors.ts on lines 248..252
    packages/codec/lib/format/errors.ts on lines 280..284
    packages/codec/lib/format/errors.ts on lines 298..302
    packages/codec/lib/format/errors.ts on lines 330..334
    packages/codec/lib/format/errors.ts on lines 348..352
    packages/codec/lib/format/errors.ts on lines 358..362
    packages/codec/lib/format/errors.ts on lines 473..477
    packages/codec/lib/format/errors.ts on lines 556..560
    packages/codec/lib/format/errors.ts on lines 574..578
    packages/codec/lib/format/errors.ts on lines 592..596
    packages/codec/lib/format/errors.ts on lines 610..614
    packages/codec/lib/format/errors.ts on lines 628..632

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

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

    export interface AddressErrorResult {
      type: Types.AddressType;
      kind: "error";
      error: GenericError | AddressError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 142..146
    packages/codec/lib/format/errors.ts on lines 174..178
    packages/codec/lib/format/errors.ts on lines 206..210
    packages/codec/lib/format/errors.ts on lines 248..252
    packages/codec/lib/format/errors.ts on lines 280..284
    packages/codec/lib/format/errors.ts on lines 330..334
    packages/codec/lib/format/errors.ts on lines 348..352
    packages/codec/lib/format/errors.ts on lines 358..362
    packages/codec/lib/format/errors.ts on lines 473..477
    packages/codec/lib/format/errors.ts on lines 502..506
    packages/codec/lib/format/errors.ts on lines 556..560
    packages/codec/lib/format/errors.ts on lines 574..578
    packages/codec/lib/format/errors.ts on lines 592..596
    packages/codec/lib/format/errors.ts on lines 610..614
    packages/codec/lib/format/errors.ts on lines 628..632

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

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

    export interface TypeErrorResult {
      type: Types.TypeType;
      kind: "error";
      error: GenericError | TypeErrorUnion;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 142..146
    packages/codec/lib/format/errors.ts on lines 174..178
    packages/codec/lib/format/errors.ts on lines 206..210
    packages/codec/lib/format/errors.ts on lines 248..252
    packages/codec/lib/format/errors.ts on lines 280..284
    packages/codec/lib/format/errors.ts on lines 298..302
    packages/codec/lib/format/errors.ts on lines 330..334
    packages/codec/lib/format/errors.ts on lines 348..352
    packages/codec/lib/format/errors.ts on lines 358..362
    packages/codec/lib/format/errors.ts on lines 473..477
    packages/codec/lib/format/errors.ts on lines 502..506
    packages/codec/lib/format/errors.ts on lines 556..560
    packages/codec/lib/format/errors.ts on lines 574..578
    packages/codec/lib/format/errors.ts on lines 592..596
    packages/codec/lib/format/errors.ts on lines 610..614

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

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

    export interface IntErrorResult {
      type: Types.IntType;
      kind: "error";
      error: GenericError | IntError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 142..146
    packages/codec/lib/format/errors.ts on lines 206..210
    packages/codec/lib/format/errors.ts on lines 248..252
    packages/codec/lib/format/errors.ts on lines 280..284
    packages/codec/lib/format/errors.ts on lines 298..302
    packages/codec/lib/format/errors.ts on lines 330..334
    packages/codec/lib/format/errors.ts on lines 348..352
    packages/codec/lib/format/errors.ts on lines 358..362
    packages/codec/lib/format/errors.ts on lines 473..477
    packages/codec/lib/format/errors.ts on lines 502..506
    packages/codec/lib/format/errors.ts on lines 556..560
    packages/codec/lib/format/errors.ts on lines 574..578
    packages/codec/lib/format/errors.ts on lines 592..596
    packages/codec/lib/format/errors.ts on lines 610..614
    packages/codec/lib/format/errors.ts on lines 628..632

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

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

    export interface StringErrorResult {
      type: Types.StringType;
      kind: "error";
      error: GenericError | StringError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 142..146
    packages/codec/lib/format/errors.ts on lines 174..178
    packages/codec/lib/format/errors.ts on lines 206..210
    packages/codec/lib/format/errors.ts on lines 248..252
    packages/codec/lib/format/errors.ts on lines 280..284
    packages/codec/lib/format/errors.ts on lines 298..302
    packages/codec/lib/format/errors.ts on lines 348..352
    packages/codec/lib/format/errors.ts on lines 358..362
    packages/codec/lib/format/errors.ts on lines 473..477
    packages/codec/lib/format/errors.ts on lines 502..506
    packages/codec/lib/format/errors.ts on lines 556..560
    packages/codec/lib/format/errors.ts on lines 574..578
    packages/codec/lib/format/errors.ts on lines 592..596
    packages/codec/lib/format/errors.ts on lines 610..614
    packages/codec/lib/format/errors.ts on lines 628..632

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

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

    export interface UintErrorResult {
      type: Types.UintType;
      kind: "error";
      error: GenericError | UintError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 174..178
    packages/codec/lib/format/errors.ts on lines 206..210
    packages/codec/lib/format/errors.ts on lines 248..252
    packages/codec/lib/format/errors.ts on lines 280..284
    packages/codec/lib/format/errors.ts on lines 298..302
    packages/codec/lib/format/errors.ts on lines 330..334
    packages/codec/lib/format/errors.ts on lines 348..352
    packages/codec/lib/format/errors.ts on lines 358..362
    packages/codec/lib/format/errors.ts on lines 473..477
    packages/codec/lib/format/errors.ts on lines 502..506
    packages/codec/lib/format/errors.ts on lines 556..560
    packages/codec/lib/format/errors.ts on lines 574..578
    packages/codec/lib/format/errors.ts on lines 592..596
    packages/codec/lib/format/errors.ts on lines 610..614
    packages/codec/lib/format/errors.ts on lines 628..632

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

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

    export interface MagicErrorResult {
      type: Types.MagicType;
      kind: "error";
      error: GenericError | MagicError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 142..146
    packages/codec/lib/format/errors.ts on lines 174..178
    packages/codec/lib/format/errors.ts on lines 206..210
    packages/codec/lib/format/errors.ts on lines 248..252
    packages/codec/lib/format/errors.ts on lines 280..284
    packages/codec/lib/format/errors.ts on lines 298..302
    packages/codec/lib/format/errors.ts on lines 330..334
    packages/codec/lib/format/errors.ts on lines 348..352
    packages/codec/lib/format/errors.ts on lines 358..362
    packages/codec/lib/format/errors.ts on lines 473..477
    packages/codec/lib/format/errors.ts on lines 502..506
    packages/codec/lib/format/errors.ts on lines 556..560
    packages/codec/lib/format/errors.ts on lines 574..578
    packages/codec/lib/format/errors.ts on lines 592..596
    packages/codec/lib/format/errors.ts on lines 628..632

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

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

    export interface UfixedErrorResult {
      type: Types.UfixedType;
      kind: "error";
      error: GenericError | UfixedError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 142..146
    packages/codec/lib/format/errors.ts on lines 174..178
    packages/codec/lib/format/errors.ts on lines 206..210
    packages/codec/lib/format/errors.ts on lines 248..252
    packages/codec/lib/format/errors.ts on lines 280..284
    packages/codec/lib/format/errors.ts on lines 298..302
    packages/codec/lib/format/errors.ts on lines 330..334
    packages/codec/lib/format/errors.ts on lines 348..352
    packages/codec/lib/format/errors.ts on lines 473..477
    packages/codec/lib/format/errors.ts on lines 502..506
    packages/codec/lib/format/errors.ts on lines 556..560
    packages/codec/lib/format/errors.ts on lines 574..578
    packages/codec/lib/format/errors.ts on lines 592..596
    packages/codec/lib/format/errors.ts on lines 610..614
    packages/codec/lib/format/errors.ts on lines 628..632

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

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

    export interface StructErrorResult {
      type: Types.StructType;
      kind: "error";
      error: GenericError | StructError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 142..146
    packages/codec/lib/format/errors.ts on lines 174..178
    packages/codec/lib/format/errors.ts on lines 206..210
    packages/codec/lib/format/errors.ts on lines 248..252
    packages/codec/lib/format/errors.ts on lines 280..284
    packages/codec/lib/format/errors.ts on lines 298..302
    packages/codec/lib/format/errors.ts on lines 330..334
    packages/codec/lib/format/errors.ts on lines 348..352
    packages/codec/lib/format/errors.ts on lines 358..362
    packages/codec/lib/format/errors.ts on lines 473..477
    packages/codec/lib/format/errors.ts on lines 502..506
    packages/codec/lib/format/errors.ts on lines 556..560
    packages/codec/lib/format/errors.ts on lines 592..596
    packages/codec/lib/format/errors.ts on lines 610..614
    packages/codec/lib/format/errors.ts on lines 628..632

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

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

    export interface BoolErrorResult {
      type: Types.BoolType;
      kind: "error";
      error: GenericError | BoolError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 142..146
    packages/codec/lib/format/errors.ts on lines 174..178
    packages/codec/lib/format/errors.ts on lines 248..252
    packages/codec/lib/format/errors.ts on lines 280..284
    packages/codec/lib/format/errors.ts on lines 298..302
    packages/codec/lib/format/errors.ts on lines 330..334
    packages/codec/lib/format/errors.ts on lines 348..352
    packages/codec/lib/format/errors.ts on lines 358..362
    packages/codec/lib/format/errors.ts on lines 473..477
    packages/codec/lib/format/errors.ts on lines 502..506
    packages/codec/lib/format/errors.ts on lines 556..560
    packages/codec/lib/format/errors.ts on lines 574..578
    packages/codec/lib/format/errors.ts on lines 592..596
    packages/codec/lib/format/errors.ts on lines 610..614
    packages/codec/lib/format/errors.ts on lines 628..632

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

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

    export interface BytesStaticErrorResult {
      type: Types.BytesTypeStatic;
      kind: "error";
      error: GenericError | BytesStaticError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 142..146
    packages/codec/lib/format/errors.ts on lines 174..178
    packages/codec/lib/format/errors.ts on lines 206..210
    packages/codec/lib/format/errors.ts on lines 280..284
    packages/codec/lib/format/errors.ts on lines 298..302
    packages/codec/lib/format/errors.ts on lines 330..334
    packages/codec/lib/format/errors.ts on lines 348..352
    packages/codec/lib/format/errors.ts on lines 358..362
    packages/codec/lib/format/errors.ts on lines 473..477
    packages/codec/lib/format/errors.ts on lines 502..506
    packages/codec/lib/format/errors.ts on lines 556..560
    packages/codec/lib/format/errors.ts on lines 574..578
    packages/codec/lib/format/errors.ts on lines 592..596
    packages/codec/lib/format/errors.ts on lines 610..614
    packages/codec/lib/format/errors.ts on lines 628..632

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

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

    export interface FixedErrorResult {
      type: Types.FixedType;
      kind: "error";
      error: GenericError | FixedError;
    }
    Severity: Major
    Found in packages/codec/lib/format/errors.ts and 15 other locations - About 40 mins to fix
    packages/codec/lib/format/errors.ts on lines 142..146
    packages/codec/lib/format/errors.ts on lines 174..178
    packages/codec/lib/format/errors.ts on lines 206..210
    packages/codec/lib/format/errors.ts on lines 248..252
    packages/codec/lib/format/errors.ts on lines 280..284
    packages/codec/lib/format/errors.ts on lines 298..302
    packages/codec/lib/format/errors.ts on lines 330..334
    packages/codec/lib/format/errors.ts on lines 358..362
    packages/codec/lib/format/errors.ts on lines 473..477
    packages/codec/lib/format/errors.ts on lines 502..506
    packages/codec/lib/format/errors.ts on lines 556..560
    packages/codec/lib/format/errors.ts on lines 574..578
    packages/codec/lib/format/errors.ts on lines 592..596
    packages/codec/lib/format/errors.ts on lines 610..614
    packages/codec/lib/format/errors.ts on lines 628..632

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

    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 AbiErrorResult =
      | UintErrorResult
      | IntErrorResult
      | BoolErrorResult
      | BytesErrorResult
    Severity: Minor
    Found in packages/codec/lib/format/errors.ts and 1 other location - About 35 mins to fix
    packages/codec/lib/format/values.ts on lines 91..102

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

    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

    There are no issues that match your filters.

    Category
    Status