polkadot-js/api

View on GitHub

Showing 2,442 of 2,627 total issues

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

  interface XcmV2MultiassetAssetId extends Enum {
    readonly isConcrete: boolean;
    readonly asConcrete: XcmV2MultiLocation;
    readonly isAbstract: boolean;
    readonly asAbstract: Bytes;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface XcmV2MultiassetMultiAssetFilter extends Enum {
    readonly isDefinite: boolean;
    readonly asDefinite: XcmV2MultiassetMultiAssets;
    readonly isWild: boolean;
    readonly asWild: XcmV2MultiassetWildMultiAsset;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface PalletAllianceUnscrupulousItem extends Enum {
    readonly isAccountId: boolean;
    readonly asAccountId: AccountId32;
    readonly isWebsite: boolean;
    readonly asWebsite: Bytes;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface FrameSupportScheduleDispatchTime extends Enum {
    readonly isAt: boolean;
    readonly asAt: u32;
    readonly isAfter: boolean;
    readonly asAfter: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface StagingKusamaRuntimeRuntimeHoldReason extends Enum {
    readonly isPreimage: boolean;
    readonly asPreimage: PalletPreimageHoldReason;
    readonly isNis: boolean;
    readonly asNis: PalletNisHoldReason;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface KitchensinkRuntimeDynamicParamsStorageParametersValue extends Enum {
    readonly isBaseDeposit: boolean;
    readonly asBaseDeposit: u128;
    readonly isByteDeposit: boolean;
    readonly asByteDeposit: u128;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface PolkadotPrimitivesV6ValidityAttestation extends Enum {
    readonly isImplicit: boolean;
    readonly asImplicit: PolkadotPrimitivesV6ValidatorAppSignature;
    readonly isExplicit: boolean;
    readonly asExplicit: PolkadotPrimitivesV6ValidatorAppSignature;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface PalletConvictionVotingVoteVoting extends Enum {
    readonly isCasting: boolean;
    readonly asCasting: PalletConvictionVotingVoteCasting;
    readonly isDelegating: boolean;
    readonly asDelegating: PalletConvictionVotingVoteDelegating;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731

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

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

  interface PolkadotPrimitivesV7ValidityAttestation extends Enum {
    readonly isImplicit: boolean;
    readonly asImplicit: PolkadotPrimitivesV7ValidatorAppSignature;
    readonly isExplicit: boolean;
    readonly asExplicit: PolkadotPrimitivesV7ValidatorAppSignature;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface XcmVersionedAssetId extends Enum {
    readonly isV3: boolean;
    readonly asV3: XcmV3MultiassetAssetId;
    readonly isV4: boolean;
    readonly asV4: StagingXcmV4AssetAssetId;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface XcmV3MultiassetMultiAssetFilter extends Enum {
    readonly isDefinite: boolean;
    readonly asDefinite: XcmV3MultiassetMultiAssets;
    readonly isWild: boolean;
    readonly asWild: XcmV3MultiassetWildMultiAsset;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface PalletXcmOrigin extends Enum {
    readonly isXcm: boolean;
    readonly asXcm: StagingXcmV4Location;
    readonly isResponse: boolean;
    readonly asResponse: StagingXcmV4Location;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface StagingXcmV4AssetAssetFilter extends Enum {
    readonly isDefinite: boolean;
    readonly asDefinite: StagingXcmV4AssetAssets;
    readonly isWild: boolean;
    readonly asWild: StagingXcmV4AssetWildAsset;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface PolkadotPrimitivesV6DisputeStatement extends Enum {
    readonly isValid: boolean;
    readonly asValid: PolkadotPrimitivesV6ValidDisputeStatementKind;
    readonly isInvalid: boolean;
    readonly asInvalid: PolkadotPrimitivesV6InvalidDisputeStatementKind;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface PalletRankedCollectiveVoteRecord extends Enum {
    readonly isAye: boolean;
    readonly asAye: u32;
    readonly isNay: boolean;
    readonly asNay: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface PolkadotRuntimeRuntimeHoldReason extends Enum {
    readonly isPreimage: boolean;
    readonly asPreimage: PalletPreimageHoldReason;
    readonly isStateTrieMigration: boolean;
    readonly asStateTrieMigration: PalletStateTrieMigrationHoldReason;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-substrate.ts on lines 3221..3227
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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

  interface SpConsensusGrandpaEquivocation extends Enum {
    readonly isPrevote: boolean;
    readonly asPrevote: FinalityGrandpaEquivocationPrevote;
    readonly isPrecommit: boolean;
    readonly asPrecommit: FinalityGrandpaEquivocationPrecommit;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 18 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-kusama.ts on lines 277..283
packages/types-augment/src/lookup/types-kusama.ts on lines 293..299
packages/types-augment/src/lookup/types-kusama.ts on lines 467..473
packages/types-augment/src/lookup/types-polkadot.ts on lines 186..192
packages/types-augment/src/lookup/types-polkadot.ts on lines 477..483
packages/types-augment/src/lookup/types-polkadot.ts on lines 892..898
packages/types-augment/src/lookup/types-polkadot.ts on lines 908..914
packages/types-augment/src/lookup/types-polkadot.ts on lines 1489..1495
packages/types-augment/src/lookup/types-polkadot.ts on lines 1584..1590
packages/types-augment/src/lookup/types-polkadot.ts on lines 1928..1934
packages/types-augment/src/lookup/types-polkadot.ts on lines 2223..2229
packages/types-augment/src/lookup/types-polkadot.ts on lines 2279..2285
packages/types-augment/src/lookup/types-polkadot.ts on lines 2737..2743
packages/types-augment/src/lookup/types-substrate.ts on lines 5116..5122
packages/types-augment/src/lookup/types-substrate.ts on lines 5332..5338
packages/types-augment/src/lookup/types-substrate.ts on lines 6260..6266
packages/types-augment/src/lookup/types-substrate.ts on lines 6725..6731
packages/types-augment/src/lookup/types-substrate.ts on lines 8632..8638

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

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 interface BidKind extends Enum {
  readonly isDeposit: boolean;
  readonly asDeposit: Balance;
  readonly isVouch: boolean;
  readonly asVouch: ITuple<[AccountId, Balance]>;
Severity: Major
Found in packages/types/src/interfaces/society/types.ts and 1 other location - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 7658..7664

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

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

      getTransactionByBlockNumberAndIndex: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthTransaction>>;
Severity: Major
Found in packages/rpc-augment/src/augment/jsonrpc.ts and 1 other location - About 1 hr to fix
packages/rpc-augment/src/augment/jsonrpc.ts on lines 290..290

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

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 interface CollectiveOrigin extends Enum {
  readonly isMembers: boolean;
  readonly asMembers: ITuple<[MemberCount, MemberCount]>;
  readonly isMember: boolean;
  readonly asMember: AccountId;
Severity: Major
Found in packages/types/src/interfaces/collective/types.ts and 1 other location - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 6015..6021

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

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