trufflesuite/truffle

View on GitHub

Showing 716 of 1,401 total issues

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

      if (deployer.options && deployer.options.events) {
        message = await deployer.options.events.emit(
          "deployment:error",
          eventArgs
        );
Severity: Minor
Found in packages/deployer/src/linker.js and 1 other location - About 40 mins to fix
packages/deployer/src/linker.js on lines 43..48

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

export const BLOCK_DEFINITION = {
  id: -1,
  src: "0:0:-1",
  name: "block",
  nodeType: "VariableDeclaration",
Severity: Major
Found in packages/debugger/lib/data/selectors/index.js and 2 other locations - About 40 mins to fix
packages/debugger/lib/data/selectors/index.js on lines 142..151
packages/debugger/lib/data/selectors/index.js on lines 153..162

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 function* begin() {
  let guard = yield select(
    sourcemapping.transaction.bottomStackframeRequiresPhantomFrame
  );
  yield put(actions.externalCall(guard));
Severity: Minor
Found in packages/debugger/lib/sourcemapping/sagas/index.js and 1 other location - About 40 mins to fix
packages/debugger/lib/sourcemapping/sagas/index.js on lines 55..60

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

export const MSG_DEFINITION = {
  id: -1,
  src: "0:0:-1",
  name: "msg",
  nodeType: "VariableDeclaration",
Severity: Major
Found in packages/debugger/lib/data/selectors/index.js and 2 other locations - About 40 mins to fix
packages/debugger/lib/data/selectors/index.js on lines 153..162
packages/debugger/lib/data/selectors/index.js on lines 164..173

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

Severity
Category
Status
Source
Language