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

    readonly asAssetTxFeePaid: {
      readonly who: AccountId32;
      readonly actualFee: u128;
      readonly tip: u128;
      readonly assetId: Option<u32>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 7 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2670..2675
packages/types-augment/src/lookup/types-substrate.ts on lines 1832..1837
packages/types-augment/src/lookup/types-substrate.ts on lines 2019..2024
packages/types-augment/src/lookup/types-substrate.ts on lines 4522..4527
packages/types-augment/src/lookup/types-substrate.ts on lines 4589..4594
packages/types-augment/src/lookup/types-substrate.ts on lines 6537..6542
packages/types/src/interfaces/xcm/types.ts on lines 1912..1917

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

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

    readonly asApproveTransfer: {
      readonly collection: u32;
      readonly item: u32;
      readonly delegate: MultiAddress;
      readonly maybeDeadline: Option<u32>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 7 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2670..2675
packages/types-augment/src/lookup/types-substrate.ts on lines 362..367
packages/types-augment/src/lookup/types-substrate.ts on lines 1832..1837
packages/types-augment/src/lookup/types-substrate.ts on lines 2019..2024
packages/types-augment/src/lookup/types-substrate.ts on lines 4522..4527
packages/types-augment/src/lookup/types-substrate.ts on lines 6537..6542
packages/types/src/interfaces/xcm/types.ts on lines 1912..1917

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

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

    readonly asSetTeam: {
      readonly id: Compact<u32>;
      readonly issuer: MultiAddress;
      readonly admin: MultiAddress;
      readonly freezer: MultiAddress;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 3 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 3480..3485
packages/types-augment/src/lookup/types-substrate.ts on lines 4116..4121
packages/types-augment/src/lookup/types-substrate.ts on lines 5368..5373

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

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

    readonly asSetMetadata: {
      readonly id: Compact<u32>;
      readonly name: Bytes;
      readonly symbol: Bytes;
      readonly decimals: u8;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 3 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 3480..3485
packages/types-augment/src/lookup/types-substrate.ts on lines 4109..4114
packages/types-augment/src/lookup/types-substrate.ts on lines 5368..5373

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

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

    readonly asCreate: {
      readonly amount: Compact<u128>;
      readonly root: MultiAddress;
      readonly nominator: MultiAddress;
      readonly bouncer: MultiAddress;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 3 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 3480..3485
packages/types-augment/src/lookup/types-substrate.ts on lines 4109..4114
packages/types-augment/src/lookup/types-substrate.ts on lines 4116..4121

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

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

          if (section !== 'state' || method !== 'getMetadata') {
            it(`output ${type} is known`, (): void => {
              expect(() => inspectType(type)).not.toThrow();
            });
          }
Severity: Major
Found in packages/types/src/interfaces/definitions.spec.ts and 1 other location - About 1 hr to fix
packages/types/src/interfaces/definitions.spec.ts on lines 132..136

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

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

    readonly asItemPriceSet: {
      readonly collection: u32;
      readonly item: u32;
      readonly price: u128;
      readonly whitelistedBuyer: Option<AccountId32>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 7 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2670..2675
packages/types-augment/src/lookup/types-substrate.ts on lines 362..367
packages/types-augment/src/lookup/types-substrate.ts on lines 2019..2024
packages/types-augment/src/lookup/types-substrate.ts on lines 4522..4527
packages/types-augment/src/lookup/types-substrate.ts on lines 4589..4594
packages/types-augment/src/lookup/types-substrate.ts on lines 6537..6542
packages/types/src/interfaces/xcm/types.ts on lines 1912..1917

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

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

                it(`${name}: ${type} is known`, (): void => {
                  expect(() => inspectType(type)).not.toThrow();
                });
Severity: Major
Found in packages/types/src/interfaces/definitions.spec.ts and 1 other location - About 1 hr to fix
packages/types/src/interfaces/definitions.spec.ts on lines 145..147

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

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

    readonly asItemPriceSet: {
      readonly collection: u32;
      readonly item: u32;
      readonly price: u128;
      readonly whitelistedBuyer: Option<AccountId32>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 7 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2670..2675
packages/types-augment/src/lookup/types-substrate.ts on lines 362..367
packages/types-augment/src/lookup/types-substrate.ts on lines 1832..1837
packages/types-augment/src/lookup/types-substrate.ts on lines 4522..4527
packages/types-augment/src/lookup/types-substrate.ts on lines 4589..4594
packages/types-augment/src/lookup/types-substrate.ts on lines 6537..6542
packages/types/src/interfaces/xcm/types.ts on lines 1912..1917

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

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

    readonly asMint: {
      readonly collection: u32;
      readonly item: u32;
      readonly mintTo: MultiAddress;
      readonly witnessData: Option<PalletNftsMintWitness>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 7 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2670..2675
packages/types-augment/src/lookup/types-substrate.ts on lines 362..367
packages/types-augment/src/lookup/types-substrate.ts on lines 1832..1837
packages/types-augment/src/lookup/types-substrate.ts on lines 2019..2024
packages/types-augment/src/lookup/types-substrate.ts on lines 4589..4594
packages/types-augment/src/lookup/types-substrate.ts on lines 6537..6542
packages/types/src/interfaces/xcm/types.ts on lines 1912..1917

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

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

    readonly asProvideJudgement: {
      readonly regIndex: Compact<u32>;
      readonly target: MultiAddress;
      readonly judgement: PalletIdentityJudgement;
      readonly identity: H256;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 3 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 4109..4114
packages/types-augment/src/lookup/types-substrate.ts on lines 4116..4121
packages/types-augment/src/lookup/types-substrate.ts on lines 5368..5373

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

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

  readonly asDepositReserveAsset: {
    readonly assets: MultiAssetFilterV1;
    readonly maxAssets: u32;
    readonly dest: MultiLocationV1;
    readonly effects: Vec<XcmOrderV1>;
Severity: Major
Found in packages/types/src/interfaces/xcm/types.ts and 7 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-polkadot.ts on lines 2670..2675
packages/types-augment/src/lookup/types-substrate.ts on lines 362..367
packages/types-augment/src/lookup/types-substrate.ts on lines 1832..1837
packages/types-augment/src/lookup/types-substrate.ts on lines 2019..2024
packages/types-augment/src/lookup/types-substrate.ts on lines 4522..4527
packages/types-augment/src/lookup/types-substrate.ts on lines 4589..4594
packages/types-augment/src/lookup/types-substrate.ts on lines 6537..6542

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

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

    readonly asInvalidQuerier: {
      readonly origin: StagingXcmV4Location;
      readonly queryId: u64;
      readonly expectedQuerier: StagingXcmV4Location;
      readonly maybeActualQuerier: Option<StagingXcmV4Location>;
Severity: Major
Found in packages/types-augment/src/lookup/types-polkadot.ts and 7 other locations - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 362..367
packages/types-augment/src/lookup/types-substrate.ts on lines 1832..1837
packages/types-augment/src/lookup/types-substrate.ts on lines 2019..2024
packages/types-augment/src/lookup/types-substrate.ts on lines 4522..4527
packages/types-augment/src/lookup/types-substrate.ts on lines 4589..4594
packages/types-augment/src/lookup/types-substrate.ts on lines 6537..6542
packages/types/src/interfaces/xcm/types.ts on lines 1912..1917

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

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

    expect(
      new ExtrinsicSignature(registry).addSignature(
        pairs.alice.publicKey,
        new Uint8Array(65).fill(1),
        new Uint8Array(0)
Severity: Major
Found in packages/types/src/extrinsic/v5/ExtrinsicSignature.spec.ts and 1 other location - About 1 hr to fix
packages/types/src/extrinsic/v4/ExtrinsicSignature.spec.ts on lines 143..158

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

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

    expect(
      new ExtrinsicSignature(registry).addSignature(
        pairs.alice.publicKey,
        new Uint8Array(65).fill(1),
        new Uint8Array(0)
Severity: Major
Found in packages/types/src/extrinsic/v4/ExtrinsicSignature.spec.ts and 1 other location - About 1 hr to fix
packages/types/src/extrinsic/v5/ExtrinsicSignature.spec.ts on lines 147..163

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

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

                  if (!skipInspectType) {
                    it(`output ${type} is known`, (): void => {
                      expect(() => inspectType(type)).not.toThrow();
                    });
                  }
Severity: Major
Found in packages/types/src/interfaces/definitions.spec.ts and 1 other location - About 1 hr to fix
packages/types/src/interfaces/definitions.spec.ts on lines 89..93

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

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

                        it(`${name}: ${type} is known`, (): void => {
                          expect(() => inspectType(type)).not.toThrow();
                        });
Severity: Major
Found in packages/types/src/interfaces/definitions.spec.ts and 1 other location - About 1 hr to fix
packages/types/src/interfaces/definitions.spec.ts on lines 98..100

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

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

  [
    0,
    1020,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 93 other locations - About 55 mins to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 64..117
packages/types-known/src/upgrades/e2e/kusama.ts on lines 118..171
packages/types-known/src/upgrades/e2e/kusama.ts on lines 172..225
packages/types-known/src/upgrades/e2e/kusama.ts on lines 226..279
packages/types-known/src/upgrades/e2e/kusama.ts on lines 280..333
packages/types-known/src/upgrades/e2e/kusama.ts on lines 334..387
packages/types-known/src/upgrades/e2e/kusama.ts on lines 388..441
packages/types-known/src/upgrades/e2e/kusama.ts on lines 442..495
packages/types-known/src/upgrades/e2e/kusama.ts on lines 496..549
packages/types-known/src/upgrades/e2e/kusama.ts on lines 550..603
packages/types-known/src/upgrades/e2e/kusama.ts on lines 604..657
packages/types-known/src/upgrades/e2e/kusama.ts on lines 658..711
packages/types-known/src/upgrades/e2e/kusama.ts on lines 712..765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 766..819
packages/types-known/src/upgrades/e2e/kusama.ts on lines 820..873
packages/types-known/src/upgrades/e2e/kusama.ts on lines 874..927
packages/types-known/src/upgrades/e2e/kusama.ts on lines 928..981
packages/types-known/src/upgrades/e2e/kusama.ts on lines 982..1035
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1036..1089
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1090..1143
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1144..1197
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1198..1251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1252..1305
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1306..1359
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1360..1413
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1414..1467
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1468..1521
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1522..1575
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1576..1629
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1630..1683
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1684..1737
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1738..1791
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1792..1845
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1846..1899
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1900..1953
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1954..2007
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2008..2061
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2062..2115
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2116..2169
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2170..2223
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2224..2277
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2278..2331
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 10..63
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 64..117
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 118..171
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 172..225
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 226..279
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 280..333
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 334..387
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 388..441
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 442..495
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 496..549
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 550..603
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 604..657
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 658..711
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 712..765
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 766..819
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 820..873
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 874..927
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 928..981
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 982..1035
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1036..1089
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1090..1143
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1144..1197
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1198..1251
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1252..1305
packages/types-known/src/upgrades/e2e/westend.ts on lines 10..63
packages/types-known/src/upgrades/e2e/westend.ts on lines 64..117
packages/types-known/src/upgrades/e2e/westend.ts on lines 118..171
packages/types-known/src/upgrades/e2e/westend.ts on lines 172..225
packages/types-known/src/upgrades/e2e/westend.ts on lines 226..279
packages/types-known/src/upgrades/e2e/westend.ts on lines 280..333
packages/types-known/src/upgrades/e2e/westend.ts on lines 334..387
packages/types-known/src/upgrades/e2e/westend.ts on lines 388..441
packages/types-known/src/upgrades/e2e/westend.ts on lines 442..495
packages/types-known/src/upgrades/e2e/westend.ts on lines 496..549
packages/types-known/src/upgrades/e2e/westend.ts on lines 550..603
packages/types-known/src/upgrades/e2e/westend.ts on lines 604..657
packages/types-known/src/upgrades/e2e/westend.ts on lines 658..711
packages/types-known/src/upgrades/e2e/westend.ts on lines 712..765
packages/types-known/src/upgrades/e2e/westend.ts on lines 766..819
packages/types-known/src/upgrades/e2e/westend.ts on lines 820..873
packages/types-known/src/upgrades/e2e/westend.ts on lines 874..927
packages/types-known/src/upgrades/e2e/westend.ts on lines 928..981
packages/types-known/src/upgrades/e2e/westend.ts on lines 982..1035
packages/types-known/src/upgrades/e2e/westend.ts on lines 1036..1089
packages/types-known/src/upgrades/e2e/westend.ts on lines 1090..1143
packages/types-known/src/upgrades/e2e/westend.ts on lines 1144..1197
packages/types-known/src/upgrades/e2e/westend.ts on lines 1198..1251
packages/types-known/src/upgrades/e2e/westend.ts on lines 1252..1305
packages/types-known/src/upgrades/e2e/westend.ts on lines 1306..1359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1360..1413
packages/types-known/src/upgrades/e2e/westend.ts on lines 1414..1467

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

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

  [
    569327,
    1038,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 93 other locations - About 55 mins to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 10..63
packages/types-known/src/upgrades/e2e/kusama.ts on lines 64..117
packages/types-known/src/upgrades/e2e/kusama.ts on lines 118..171
packages/types-known/src/upgrades/e2e/kusama.ts on lines 172..225
packages/types-known/src/upgrades/e2e/kusama.ts on lines 226..279
packages/types-known/src/upgrades/e2e/kusama.ts on lines 280..333
packages/types-known/src/upgrades/e2e/kusama.ts on lines 334..387
packages/types-known/src/upgrades/e2e/kusama.ts on lines 388..441
packages/types-known/src/upgrades/e2e/kusama.ts on lines 442..495
packages/types-known/src/upgrades/e2e/kusama.ts on lines 496..549
packages/types-known/src/upgrades/e2e/kusama.ts on lines 550..603
packages/types-known/src/upgrades/e2e/kusama.ts on lines 604..657
packages/types-known/src/upgrades/e2e/kusama.ts on lines 658..711
packages/types-known/src/upgrades/e2e/kusama.ts on lines 766..819
packages/types-known/src/upgrades/e2e/kusama.ts on lines 820..873
packages/types-known/src/upgrades/e2e/kusama.ts on lines 874..927
packages/types-known/src/upgrades/e2e/kusama.ts on lines 928..981
packages/types-known/src/upgrades/e2e/kusama.ts on lines 982..1035
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1036..1089
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1090..1143
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1144..1197
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1198..1251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1252..1305
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1306..1359
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1360..1413
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1414..1467
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1468..1521
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1522..1575
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1576..1629
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1630..1683
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1684..1737
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1738..1791
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1792..1845
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1846..1899
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1900..1953
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1954..2007
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2008..2061
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2062..2115
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2116..2169
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2170..2223
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2224..2277
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2278..2331
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 10..63
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 64..117
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 118..171
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 172..225
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 226..279
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 280..333
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 334..387
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 388..441
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 442..495
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 496..549
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 550..603
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 604..657
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 658..711
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 712..765
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 766..819
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 820..873
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 874..927
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 928..981
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 982..1035
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1036..1089
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1090..1143
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1144..1197
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1198..1251
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1252..1305
packages/types-known/src/upgrades/e2e/westend.ts on lines 10..63
packages/types-known/src/upgrades/e2e/westend.ts on lines 64..117
packages/types-known/src/upgrades/e2e/westend.ts on lines 118..171
packages/types-known/src/upgrades/e2e/westend.ts on lines 172..225
packages/types-known/src/upgrades/e2e/westend.ts on lines 226..279
packages/types-known/src/upgrades/e2e/westend.ts on lines 280..333
packages/types-known/src/upgrades/e2e/westend.ts on lines 334..387
packages/types-known/src/upgrades/e2e/westend.ts on lines 388..441
packages/types-known/src/upgrades/e2e/westend.ts on lines 442..495
packages/types-known/src/upgrades/e2e/westend.ts on lines 496..549
packages/types-known/src/upgrades/e2e/westend.ts on lines 550..603
packages/types-known/src/upgrades/e2e/westend.ts on lines 604..657
packages/types-known/src/upgrades/e2e/westend.ts on lines 658..711
packages/types-known/src/upgrades/e2e/westend.ts on lines 712..765
packages/types-known/src/upgrades/e2e/westend.ts on lines 766..819
packages/types-known/src/upgrades/e2e/westend.ts on lines 820..873
packages/types-known/src/upgrades/e2e/westend.ts on lines 874..927
packages/types-known/src/upgrades/e2e/westend.ts on lines 928..981
packages/types-known/src/upgrades/e2e/westend.ts on lines 982..1035
packages/types-known/src/upgrades/e2e/westend.ts on lines 1036..1089
packages/types-known/src/upgrades/e2e/westend.ts on lines 1090..1143
packages/types-known/src/upgrades/e2e/westend.ts on lines 1144..1197
packages/types-known/src/upgrades/e2e/westend.ts on lines 1198..1251
packages/types-known/src/upgrades/e2e/westend.ts on lines 1252..1305
packages/types-known/src/upgrades/e2e/westend.ts on lines 1306..1359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1360..1413
packages/types-known/src/upgrades/e2e/westend.ts on lines 1414..1467

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

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

  [
    901442,
    1045,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 93 other locations - About 55 mins to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 10..63
packages/types-known/src/upgrades/e2e/kusama.ts on lines 64..117
packages/types-known/src/upgrades/e2e/kusama.ts on lines 118..171
packages/types-known/src/upgrades/e2e/kusama.ts on lines 172..225
packages/types-known/src/upgrades/e2e/kusama.ts on lines 226..279
packages/types-known/src/upgrades/e2e/kusama.ts on lines 280..333
packages/types-known/src/upgrades/e2e/kusama.ts on lines 334..387
packages/types-known/src/upgrades/e2e/kusama.ts on lines 388..441
packages/types-known/src/upgrades/e2e/kusama.ts on lines 442..495
packages/types-known/src/upgrades/e2e/kusama.ts on lines 496..549
packages/types-known/src/upgrades/e2e/kusama.ts on lines 550..603
packages/types-known/src/upgrades/e2e/kusama.ts on lines 604..657
packages/types-known/src/upgrades/e2e/kusama.ts on lines 658..711
packages/types-known/src/upgrades/e2e/kusama.ts on lines 712..765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 766..819
packages/types-known/src/upgrades/e2e/kusama.ts on lines 820..873
packages/types-known/src/upgrades/e2e/kusama.ts on lines 874..927
packages/types-known/src/upgrades/e2e/kusama.ts on lines 982..1035
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1036..1089
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1090..1143
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1144..1197
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1198..1251
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1252..1305
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1306..1359
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1360..1413
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1414..1467
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1468..1521
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1522..1575
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1576..1629
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1630..1683
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1684..1737
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1738..1791
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1792..1845
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1846..1899
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1900..1953
packages/types-known/src/upgrades/e2e/kusama.ts on lines 1954..2007
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2008..2061
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2062..2115
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2116..2169
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2170..2223
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2224..2277
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2278..2331
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 10..63
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 64..117
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 118..171
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 172..225
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 226..279
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 280..333
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 334..387
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 388..441
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 442..495
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 496..549
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 550..603
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 604..657
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 658..711
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 712..765
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 766..819
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 820..873
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 874..927
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 928..981
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 982..1035
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1036..1089
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1090..1143
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1144..1197
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1198..1251
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1252..1305
packages/types-known/src/upgrades/e2e/westend.ts on lines 10..63
packages/types-known/src/upgrades/e2e/westend.ts on lines 64..117
packages/types-known/src/upgrades/e2e/westend.ts on lines 118..171
packages/types-known/src/upgrades/e2e/westend.ts on lines 172..225
packages/types-known/src/upgrades/e2e/westend.ts on lines 226..279
packages/types-known/src/upgrades/e2e/westend.ts on lines 280..333
packages/types-known/src/upgrades/e2e/westend.ts on lines 334..387
packages/types-known/src/upgrades/e2e/westend.ts on lines 388..441
packages/types-known/src/upgrades/e2e/westend.ts on lines 442..495
packages/types-known/src/upgrades/e2e/westend.ts on lines 496..549
packages/types-known/src/upgrades/e2e/westend.ts on lines 550..603
packages/types-known/src/upgrades/e2e/westend.ts on lines 604..657
packages/types-known/src/upgrades/e2e/westend.ts on lines 658..711
packages/types-known/src/upgrades/e2e/westend.ts on lines 712..765
packages/types-known/src/upgrades/e2e/westend.ts on lines 766..819
packages/types-known/src/upgrades/e2e/westend.ts on lines 820..873
packages/types-known/src/upgrades/e2e/westend.ts on lines 874..927
packages/types-known/src/upgrades/e2e/westend.ts on lines 928..981
packages/types-known/src/upgrades/e2e/westend.ts on lines 982..1035
packages/types-known/src/upgrades/e2e/westend.ts on lines 1036..1089
packages/types-known/src/upgrades/e2e/westend.ts on lines 1090..1143
packages/types-known/src/upgrades/e2e/westend.ts on lines 1144..1197
packages/types-known/src/upgrades/e2e/westend.ts on lines 1198..1251
packages/types-known/src/upgrades/e2e/westend.ts on lines 1252..1305
packages/types-known/src/upgrades/e2e/westend.ts on lines 1306..1359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1360..1413
packages/types-known/src/upgrades/e2e/westend.ts on lines 1414..1467

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

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