polkadot-js/api

View on GitHub

Showing 2,442 of 2,627 total issues

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

      setMaxValidators: AugmentedSubmittable<(updated: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
Severity: Major
Found in packages/api-augment/src/polkadot/tx.ts and 7 other locations - About 1 hr to fix
packages/api-augment/src/kusama/tx.ts on lines 748..748
packages/api-augment/src/kusama/tx.ts on lines 752..752
packages/api-augment/src/kusama/tx.ts on lines 4221..4221
packages/api-augment/src/polkadot/tx.ts on lines 346..346
packages/api-augment/src/polkadot/tx.ts on lines 1548..1548
packages/api-augment/src/substrate/tx.ts on lines 3639..3639
packages/api-augment/src/substrate/tx.ts on lines 7218..7218

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

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

  [TypeDefInfo.Vec]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
    return singleParamNotation(registry, 'Vec', typeDef, definitions, imports, withShortcut);
  },
Severity: Major
Found in packages/typegen/src/util/formatting.ts and 11 other locations - About 1 hr to fix
packages/typegen/src/util/formatting.ts on lines 137..139
packages/typegen/src/util/formatting.ts on lines 169..171
packages/typegen/src/util/formatting.ts on lines 179..181
packages/typegen/src/util/formatting.ts on lines 183..185
packages/typegen/src/util/formatting.ts on lines 241..243
packages/typegen/src/util/formatting.ts on lines 245..247
packages/typegen/src/util/formatting.ts on lines 249..251
packages/typegen/src/util/formatting.ts on lines 253..255
packages/typegen/src/util/formatting.ts on lines 257..259
packages/typegen/src/util/formatting.ts on lines 261..263
packages/typegen/src/util/formatting.ts on lines 265..267

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

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

  [TypeDefInfo.Range]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
    return singleParamNotation(registry, 'Range', typeDef, definitions, imports, withShortcut);
  },
Severity: Major
Found in packages/typegen/src/util/formatting.ts and 11 other locations - About 1 hr to fix
packages/typegen/src/util/formatting.ts on lines 137..139
packages/typegen/src/util/formatting.ts on lines 169..171
packages/typegen/src/util/formatting.ts on lines 183..185
packages/typegen/src/util/formatting.ts on lines 225..227
packages/typegen/src/util/formatting.ts on lines 241..243
packages/typegen/src/util/formatting.ts on lines 245..247
packages/typegen/src/util/formatting.ts on lines 249..251
packages/typegen/src/util/formatting.ts on lines 253..255
packages/typegen/src/util/formatting.ts on lines 257..259
packages/typegen/src/util/formatting.ts on lines 261..263
packages/typegen/src/util/formatting.ts on lines 265..267

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

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

  [TypeDefInfo.RangeInclusive]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
    return singleParamNotation(registry, 'RangeInclusive', typeDef, definitions, imports, withShortcut);
  },
Severity: Major
Found in packages/typegen/src/util/formatting.ts and 11 other locations - About 1 hr to fix
packages/typegen/src/util/formatting.ts on lines 137..139
packages/typegen/src/util/formatting.ts on lines 169..171
packages/typegen/src/util/formatting.ts on lines 179..181
packages/typegen/src/util/formatting.ts on lines 225..227
packages/typegen/src/util/formatting.ts on lines 241..243
packages/typegen/src/util/formatting.ts on lines 245..247
packages/typegen/src/util/formatting.ts on lines 249..251
packages/typegen/src/util/formatting.ts on lines 253..255
packages/typegen/src/util/formatting.ts on lines 257..259
packages/typegen/src/util/formatting.ts on lines 261..263
packages/typegen/src/util/formatting.ts on lines 265..267

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

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

      forceDefaultXcmVersion: AugmentedSubmittable<(maybeXcmVersion: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
Severity: Major
Found in packages/api-augment/src/kusama/tx.ts and 7 other locations - About 1 hr to fix
packages/api-augment/src/kusama/tx.ts on lines 748..748
packages/api-augment/src/kusama/tx.ts on lines 752..752
packages/api-augment/src/polkadot/tx.ts on lines 342..342
packages/api-augment/src/polkadot/tx.ts on lines 346..346
packages/api-augment/src/polkadot/tx.ts on lines 1548..1548
packages/api-augment/src/substrate/tx.ts on lines 3639..3639
packages/api-augment/src/substrate/tx.ts on lines 7218..7218

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

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

      setMaxValidatorsPerCore: AugmentedSubmittable<(updated: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
Severity: Major
Found in packages/api-augment/src/polkadot/tx.ts and 7 other locations - About 1 hr to fix
packages/api-augment/src/kusama/tx.ts on lines 748..748
packages/api-augment/src/kusama/tx.ts on lines 752..752
packages/api-augment/src/kusama/tx.ts on lines 4221..4221
packages/api-augment/src/polkadot/tx.ts on lines 342..342
packages/api-augment/src/polkadot/tx.ts on lines 1548..1548
packages/api-augment/src/substrate/tx.ts on lines 3639..3639
packages/api-augment/src/substrate/tx.ts on lines 7218..7218

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

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

      setAcceptOwnership: AugmentedSubmittable<(maybeCollection: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
Severity: Major
Found in packages/api-augment/src/substrate/tx.ts and 7 other locations - About 1 hr to fix
packages/api-augment/src/kusama/tx.ts on lines 748..748
packages/api-augment/src/kusama/tx.ts on lines 752..752
packages/api-augment/src/kusama/tx.ts on lines 4221..4221
packages/api-augment/src/polkadot/tx.ts on lines 342..342
packages/api-augment/src/polkadot/tx.ts on lines 346..346
packages/api-augment/src/polkadot/tx.ts on lines 1548..1548
packages/api-augment/src/substrate/tx.ts on lines 7218..7218

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

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

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

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

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

Refactorings

Further Reading

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

  [
    12077324,
    9271,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 4 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3696..3761
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2360..2425
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2426..2491
packages/types-known/src/upgrades/e2e/westend.ts on lines 3328..3393

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

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

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

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

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

Refactorings

Further Reading

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

  [
    14248044,
    9271,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 4 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2360..2425
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2426..2491
packages/types-known/src/upgrades/e2e/westend.ts on lines 3328..3393
packages/types-known/src/upgrades/e2e/westend.ts on lines 3394..3459

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

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

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

  interface PalletXcmVersionMigrationStage extends Enum {
    readonly isMigrateSupportedVersion: boolean;
    readonly isMigrateVersionNotifiers: boolean;
    readonly isNotifyCurrentTargets: boolean;
    readonly asNotifyCurrentTargets: Option<Bytes>;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 1 other location - About 1 hr to fix
packages/types/src/interfaces/xcm/types.ts on lines 1566..1573

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

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

      forceDefaultXcmVersion: AugmentedSubmittable<(maybeXcmVersion: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
Severity: Major
Found in packages/api-augment/src/polkadot/tx.ts and 7 other locations - About 1 hr to fix
packages/api-augment/src/kusama/tx.ts on lines 748..748
packages/api-augment/src/kusama/tx.ts on lines 752..752
packages/api-augment/src/kusama/tx.ts on lines 4221..4221
packages/api-augment/src/polkadot/tx.ts on lines 342..342
packages/api-augment/src/polkadot/tx.ts on lines 346..346
packages/api-augment/src/substrate/tx.ts on lines 3639..3639
packages/api-augment/src/substrate/tx.ts on lines 7218..7218

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

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

      setMaxValidatorsPerCore: AugmentedSubmittable<(updated: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
Severity: Major
Found in packages/api-augment/src/kusama/tx.ts and 7 other locations - About 1 hr to fix
packages/api-augment/src/kusama/tx.ts on lines 748..748
packages/api-augment/src/kusama/tx.ts on lines 4221..4221
packages/api-augment/src/polkadot/tx.ts on lines 342..342
packages/api-augment/src/polkadot/tx.ts on lines 346..346
packages/api-augment/src/polkadot/tx.ts on lines 1548..1548
packages/api-augment/src/substrate/tx.ts on lines 3639..3639
packages/api-augment/src/substrate/tx.ts on lines 7218..7218

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

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

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

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

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

Refactorings

Further Reading

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

  [
    12245277,
    9281,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/polkadot.ts and 4 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3696..3761
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2360..2425
packages/types-known/src/upgrades/e2e/westend.ts on lines 3328..3393
packages/types-known/src/upgrades/e2e/westend.ts on lines 3394..3459

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

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

      setAcceptOwnership: AugmentedSubmittable<(maybeCollection: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
Severity: Major
Found in packages/api-augment/src/substrate/tx.ts and 7 other locations - About 1 hr to fix
packages/api-augment/src/kusama/tx.ts on lines 748..748
packages/api-augment/src/kusama/tx.ts on lines 752..752
packages/api-augment/src/kusama/tx.ts on lines 4221..4221
packages/api-augment/src/polkadot/tx.ts on lines 342..342
packages/api-augment/src/polkadot/tx.ts on lines 346..346
packages/api-augment/src/polkadot/tx.ts on lines 1548..1548
packages/api-augment/src/substrate/tx.ts on lines 3639..3639

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

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

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

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

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

Refactorings

Further Reading

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

  [
    11987927,
    9270,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 4 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3696..3761
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2360..2425
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2426..2491
packages/types-known/src/upgrades/e2e/westend.ts on lines 3394..3459

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

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

      setMaxValidators: AugmentedSubmittable<(updated: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
Severity: Major
Found in packages/api-augment/src/kusama/tx.ts and 7 other locations - About 1 hr to fix
packages/api-augment/src/kusama/tx.ts on lines 752..752
packages/api-augment/src/kusama/tx.ts on lines 4221..4221
packages/api-augment/src/polkadot/tx.ts on lines 342..342
packages/api-augment/src/polkadot/tx.ts on lines 346..346
packages/api-augment/src/polkadot/tx.ts on lines 1548..1548
packages/api-augment/src/substrate/tx.ts on lines 3639..3639
packages/api-augment/src/substrate/tx.ts on lines 7218..7218

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

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

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

export interface VersionMigrationStage extends Enum {
  readonly isMigrateSupportedVersion: boolean;
  readonly isMigrateVersionNotifiers: boolean;
  readonly isNotifyCurrentTargets: boolean;
  readonly asNotifyCurrentTargets: Option<Bytes>;
Severity: Major
Found in packages/types/src/interfaces/xcm/types.ts and 1 other location - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 3311..3318

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

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

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

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

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

Refactorings

Further Reading

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

  [
    12217535,
    9280,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/polkadot.ts and 4 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3696..3761
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2426..2491
packages/types-known/src/upgrades/e2e/westend.ts on lines 3328..3393
packages/types-known/src/upgrades/e2e/westend.ts on lines 3394..3459

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

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 StagingXcmV4AssetFungibility extends Enum {
    readonly isFungible: boolean;
    readonly asFungible: Compact<u128>;
    readonly isNonFungible: boolean;
    readonly asNonFungible: StagingXcmV4AssetAssetInstance;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 2 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 1498..1504
packages/types-augment/src/lookup/types-polkadot.ts on lines 1813..1819

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

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

    readonly asSchedule: {
      readonly when: u32;
      readonly maybePeriodic: Option<ITuple<[u32, u32]>>;
      readonly priority: u8;
      readonly call: Call;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 3763..3768

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

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