polkadot-js/api

View on GitHub
packages/types-augment/src/lookup/types-kusama.ts

Summary

Maintainability
F
4 days
Test Coverage

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

  interface StagingKusamaRuntimeGovernanceOriginsPalletCustomOriginsOrigin extends Enum {
    readonly isStakingAdmin: boolean;
    readonly isTreasurer: boolean;
    readonly isFellowshipAdmin: boolean;
    readonly isGeneralAdmin: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 2 other locations - About 1 day to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 7073..7103
packages/types-augment/src/lookup/types-substrate.ts on lines 9063..9093

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

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

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

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

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

Refactorings

Further Reading

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

  interface StagingKusamaRuntimeProxyType extends Enum {
    readonly isAny: boolean;
    readonly isNonTransfer: boolean;
    readonly isGovernance: boolean;
    readonly isStaking: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 5 other locations - About 3 hrs to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2852..2863
packages/types-augment/src/lookup/types-polkadot.ts on lines 3080..3091
packages/types-augment/src/lookup/types-substrate.ts on lines 6753..6764
packages/types-augment/src/lookup/types-substrate.ts on lines 8403..8414
packages/types-augment/src/lookup/types-substrate.ts on lines 8946..8957

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

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

  interface StagingKusamaRuntimeOriginCaller extends Enum {
    readonly isSystem: boolean;
    readonly asSystem: FrameSupportDispatchRawOrigin;
    readonly isVoid: boolean;
    readonly isOrigins: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 2 other locations - About 3 hrs to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 419..430
packages/types-augment/src/lookup/types-substrate.ts on lines 2525..2536

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

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

  interface PolkadotRuntimeParachainsAssignerOnDemandPalletCall extends Enum {
    readonly isPlaceOrderAllowDeath: boolean;
    readonly asPlaceOrderAllowDeath: {
      readonly maxAmount: u128;
      readonly paraId: u32;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 2 other locations - About 3 hrs to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 18..30
packages/types-augment/src/lookup/types-substrate.ts on lines 658..670

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

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

  interface PolkadotRuntimeParachainsAssignerOnDemandPalletEvent extends Enum {
    readonly isOnDemandOrderPlaced: boolean;
    readonly asOnDemandOrderPlaced: {
      readonly paraId: u32;
      readonly spotPrice: u128;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 1 other location - About 3 hrs to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 1218..1229

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

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

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

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

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

Refactorings

Further Reading

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

  interface PolkadotRuntimeParachainsAssignerCoretimePalletError extends Enum {
    readonly isAssignmentsEmpty: boolean;
    readonly isOverScheduled: boolean;
    readonly isUnderScheduled: boolean;
    readonly isDisallowedInsert: boolean;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 5 other locations - About 2 hrs to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2721..2729
packages/types-augment/src/lookup/types-polkadot.ts on lines 3100..3108
packages/types-augment/src/lookup/types-substrate.ts on lines 756..764
packages/types-augment/src/lookup/types-substrate.ts on lines 2300..2308
packages/types-augment/src/lookup/types-substrate.ts on lines 8909..8917

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

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 9 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 8 other locations - About 2 hrs to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 269..277
packages/types-augment/src/lookup/types-polkadot.ts on lines 1225..1233
packages/types-augment/src/lookup/types-polkadot.ts on lines 1315..1323
packages/types-augment/src/lookup/types-polkadot.ts on lines 2227..2235
packages/types-augment/src/lookup/types-polkadot.ts on lines 3230..3238
packages/types-augment/src/lookup/types-substrate.ts on lines 3568..3576
packages/types-augment/src/lookup/types-substrate.ts on lines 6660..6668
packages/types-augment/src/lookup/types-substrate.ts on lines 6773..6781

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

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

  interface StagingKusamaRuntimeSessionKeys extends Struct {
    readonly grandpa: SpConsensusGrandpaAppPublic;
    readonly babe: SpConsensusBabeAppPublic;
    readonly paraValidator: PolkadotPrimitivesV6ValidatorAppPublic;
    readonly paraAssignment: PolkadotPrimitivesV6AssignmentAppPublic;
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 8 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 397..404
packages/types-augment/src/lookup/types-polkadot.ts on lines 2996..3003
packages/types-augment/src/lookup/types-substrate.ts on lines 2959..2966
packages/types-augment/src/lookup/types-substrate.ts on lines 7318..7325
packages/types-augment/src/lookup/types-substrate.ts on lines 7482..7489
packages/types-augment/src/lookup/types-substrate.ts on lines 7907..7914
packages/types-augment/src/lookup/types-substrate.ts on lines 8209..8216
packages/types-augment/src/lookup/types-substrate.ts on lines 8936..8943

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

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

  interface PolkadotRuntimeParachainsAssignerOnDemandPalletError extends Enum {
    readonly isInvalidParaId: boolean;
    readonly isQueueFull: boolean;
    readonly isSpotPriceHigherThanMaxAmount: boolean;
    readonly type: 'InvalidParaId' | 'QueueFull' | 'SpotPriceHigherThanMaxAmount';
Severity: Major
Found in packages/types-augment/src/lookup/types-kusama.ts and 15 other locations - About 50 mins to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 113..118
packages/types-augment/src/lookup/types-substrate.ts on lines 172..177
packages/types-augment/src/lookup/types-substrate.ts on lines 650..655
packages/types-augment/src/lookup/types-substrate.ts on lines 2617..2622
packages/types-augment/src/lookup/types-substrate.ts on lines 4727..4732
packages/types-augment/src/lookup/types-substrate.ts on lines 5405..5410
packages/types-augment/src/lookup/types-substrate.ts on lines 6634..6639
packages/types-augment/src/lookup/types-substrate.ts on lines 6842..6847
packages/types-augment/src/lookup/types-substrate.ts on lines 7265..7270
packages/types-augment/src/lookup/types-substrate.ts on lines 7359..7364
packages/types-augment/src/lookup/types-substrate.ts on lines 7995..8000
packages/types-augment/src/lookup/types-substrate.ts on lines 8011..8016
packages/types-augment/src/lookup/types-substrate.ts on lines 8219..8224
packages/types-augment/src/lookup/types-substrate.ts on lines 8502..8507
packages/types-augment/src/lookup/types-substrate.ts on lines 8678..8683

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

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

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

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

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

Refactorings

Further Reading

There are no issues that match your filters.

Category
Status