polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

      externalPropose: AugmentedSubmittable<(proposal: FrameSupportPreimagesBounded | { Legacy: any } | { Inline: any } | { Lookup: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportPreimagesBounded]>;
Severity: Major
Found in packages/api-augment/src/substrate/tx.ts and 7 other locations - About 2 hrs to fix
packages/api-augment/src/kusama/tx.ts on lines 4228..4228
packages/api-augment/src/kusama/tx.ts on lines 4244..4244
packages/api-augment/src/polkadot/tx.ts on lines 1552..1552
packages/api-augment/src/polkadot/tx.ts on lines 1560..1560
packages/api-augment/src/substrate/tx.ts on lines 2089..2089
packages/api-augment/src/substrate/tx.ts on lines 2103..2103
packages/api-augment/src/substrate/tx.ts on lines 2385..2385

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

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

      forceSubscribeVersionNotify: AugmentedSubmittable<(location: XcmVersionedLocation | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedLocation]>;
Severity: Major
Found in packages/api-augment/src/polkadot/tx.ts and 7 other locations - About 2 hrs to fix
packages/api-augment/src/kusama/tx.ts on lines 4228..4228
packages/api-augment/src/kusama/tx.ts on lines 4244..4244
packages/api-augment/src/polkadot/tx.ts on lines 1560..1560
packages/api-augment/src/substrate/tx.ts on lines 2075..2075
packages/api-augment/src/substrate/tx.ts on lines 2089..2089
packages/api-augment/src/substrate/tx.ts on lines 2103..2103
packages/api-augment/src/substrate/tx.ts on lines 2385..2385

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

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

      forceUnsubscribeVersionNotify: AugmentedSubmittable<(location: XcmVersionedLocation | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedLocation]>;
Severity: Major
Found in packages/api-augment/src/polkadot/tx.ts and 7 other locations - About 2 hrs to fix
packages/api-augment/src/kusama/tx.ts on lines 4228..4228
packages/api-augment/src/kusama/tx.ts on lines 4244..4244
packages/api-augment/src/polkadot/tx.ts on lines 1552..1552
packages/api-augment/src/substrate/tx.ts on lines 2075..2075
packages/api-augment/src/substrate/tx.ts on lines 2089..2089
packages/api-augment/src/substrate/tx.ts on lines 2103..2103
packages/api-augment/src/substrate/tx.ts on lines 2385..2385

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

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

  it('has the correct message arguments', (): void => {
    expect(
      latest.spec.messages[1].args.map(({ label }) => label.toString())
    ).toEqual(['owner']);
  });
Severity: Major
Found in packages/api-contract/src/Abi/toLatestCompatible.spec.ts and 2 other locations - About 2 hrs to fix
packages/api-contract/src/Abi/toLatestCompatible.spec.ts on lines 34..38
packages/api-contract/src/Abi/toLatestCompatible.spec.ts on lines 85..89

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

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

  it('has the correct constructor arguments', (): void => {
    expect(
      latest.spec.constructors[0].args.map(({ label }) => label.toString())
    ).toEqual(['initial_supply']);
  });
Severity: Major
Found in packages/api-contract/src/Abi/toLatestCompatible.spec.ts and 2 other locations - About 2 hrs to fix
packages/api-contract/src/Abi/toLatestCompatible.spec.ts on lines 40..44
packages/api-contract/src/Abi/toLatestCompatible.spec.ts on lines 85..89

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

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

  it('has the correct constructor arguments', (): void => {
    expect(
      latest.spec.constructors[0].args.map(({ label }) => label.toString())
    ).toEqual(['init_value']);
  });
Severity: Major
Found in packages/api-contract/src/Abi/toLatestCompatible.spec.ts and 2 other locations - About 2 hrs to fix
packages/api-contract/src/Abi/toLatestCompatible.spec.ts on lines 34..38
packages/api-contract/src/Abi/toLatestCompatible.spec.ts on lines 40..44

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

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

    addChain: (chainSpec: string, cb: Sc.JsonRpcCallback): Promise<MockChain> =>
      addChainInterceptor.then(() => {
        const result = getFakeChain(chainSpec, cb);

        chains.push(result);
Severity: Major
Found in packages/rpc-provider/src/substrate-connect/index.spec.ts and 1 other location - About 2 hrs to fix
packages/rpc-provider/src/substrate-connect/index.spec.ts on lines 144..154

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

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 asScheduleNamed: {
      readonly id: U8aFixed;
      readonly when: u32;
      readonly maybePeriodic: Option<ITuple<[u32, u32]>>;
      readonly priority: u8;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 2 hrs to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 3770..3776

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

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 class CodePromise extends Code<'promise'> {
  constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined) {
    super(api, abi, wasm, toPromiseMethod);
  }
}
Severity: Major
Found in packages/api-contract/src/promise/index.ts and 1 other location - About 2 hrs to fix
packages/api-contract/src/rx/index.ts on lines 18..22

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

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 asScheduleNamedAfter: {
      readonly id: U8aFixed;
      readonly after: u32;
      readonly maybePeriodic: Option<ITuple<[u32, u32]>>;
      readonly priority: u8;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 2 hrs to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 3751..3757

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

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

    addWellKnownChain: (
      wellKnownChain: string,
      cb: Sc.JsonRpcCallback
    ): Promise<MockChain> =>
      addWellKnownChainInterceptor.then(() => {
Severity: Major
Found in packages/rpc-provider/src/substrate-connect/index.spec.ts and 1 other location - About 2 hrs to fix
packages/rpc-provider/src/substrate-connect/index.spec.ts on lines 136..143

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

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 class CodeRx extends Code<'rxjs'> {
  constructor (api: ApiRx, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined) {
    super(api, abi, wasm, toRxMethod);
  }
}
Severity: Major
Found in packages/api-contract/src/rx/index.ts and 1 other location - About 2 hrs to fix
packages/api-contract/src/promise/index.ts on lines 18..22

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

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

  [
    18625000,
    9430,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 10 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4392..4465
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2842..2915
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2916..2989
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2990..3063
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3064..3137
packages/types-known/src/upgrades/e2e/westend.ts on lines 4230..4303
packages/types-known/src/upgrades/e2e/westend.ts on lines 4304..4377
packages/types-known/src/upgrades/e2e/westend.ts on lines 4378..4451
packages/types-known/src/upgrades/e2e/westend.ts on lines 4452..4525
packages/types-known/src/upgrades/e2e/westend.ts on lines 4526..4599

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

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

  [
    17840000,
    9431,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/polkadot.ts and 10 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4392..4465
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4466..4539
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2842..2915
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2916..2989
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3064..3137
packages/types-known/src/upgrades/e2e/westend.ts on lines 4230..4303
packages/types-known/src/upgrades/e2e/westend.ts on lines 4304..4377
packages/types-known/src/upgrades/e2e/westend.ts on lines 4378..4451
packages/types-known/src/upgrades/e2e/westend.ts on lines 4452..4525
packages/types-known/src/upgrades/e2e/westend.ts on lines 4526..4599

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

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

  [
    14849830,
    9390,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 10 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4392..4465
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4466..4539
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2842..2915
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2916..2989
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2990..3063
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3064..3137
packages/types-known/src/upgrades/e2e/westend.ts on lines 4304..4377
packages/types-known/src/upgrades/e2e/westend.ts on lines 4378..4451
packages/types-known/src/upgrades/e2e/westend.ts on lines 4452..4525
packages/types-known/src/upgrades/e2e/westend.ts on lines 4526..4599

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

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

  [
    15661793,
    9420,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 10 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4392..4465
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4466..4539
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2842..2915
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2916..2989
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2990..3063
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3064..3137
packages/types-known/src/upgrades/e2e/westend.ts on lines 4230..4303
packages/types-known/src/upgrades/e2e/westend.ts on lines 4304..4377
packages/types-known/src/upgrades/e2e/westend.ts on lines 4378..4451
packages/types-known/src/upgrades/e2e/westend.ts on lines 4526..4599

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

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

  [
    18407475,
    1000001,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/polkadot.ts and 10 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4392..4465
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4466..4539
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2842..2915
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2916..2989
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2990..3063
packages/types-known/src/upgrades/e2e/westend.ts on lines 4230..4303
packages/types-known/src/upgrades/e2e/westend.ts on lines 4304..4377
packages/types-known/src/upgrades/e2e/westend.ts on lines 4378..4451
packages/types-known/src/upgrades/e2e/westend.ts on lines 4452..4525
packages/types-known/src/upgrades/e2e/westend.ts on lines 4526..4599

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

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

  [
    16165469,
    9430,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 10 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4392..4465
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4466..4539
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2842..2915
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2916..2989
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2990..3063
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3064..3137
packages/types-known/src/upgrades/e2e/westend.ts on lines 4230..4303
packages/types-known/src/upgrades/e2e/westend.ts on lines 4304..4377
packages/types-known/src/upgrades/e2e/westend.ts on lines 4378..4451
packages/types-known/src/upgrades/e2e/westend.ts on lines 4452..4525

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

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

  [
    15332317,
    9401,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 10 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4392..4465
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4466..4539
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2842..2915
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2916..2989
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2990..3063
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3064..3137
packages/types-known/src/upgrades/e2e/westend.ts on lines 4230..4303
packages/types-known/src/upgrades/e2e/westend.ts on lines 4304..4377
packages/types-known/src/upgrades/e2e/westend.ts on lines 4452..4525
packages/types-known/src/upgrades/e2e/westend.ts on lines 4526..4599

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

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

  [
    15146832,
    9400,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 10 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4392..4465
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4466..4539
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2842..2915
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2916..2989
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2990..3063
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3064..3137
packages/types-known/src/upgrades/e2e/westend.ts on lines 4230..4303
packages/types-known/src/upgrades/e2e/westend.ts on lines 4378..4451
packages/types-known/src/upgrades/e2e/westend.ts on lines 4452..4525
packages/types-known/src/upgrades/e2e/westend.ts on lines 4526..4599

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

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