polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

export interface SessionKeys9B extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey]> {}
Severity: Minor
Found in packages/types/src/interfaces/session/types.ts and 1 other location - About 40 mins to fix
packages/types/src/interfaces/session/types.ts on lines 71..71

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

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

      registry.register({
        Balance: 'u128',
        TestComplex: {
          balance: 'Balance',
          // eslint-disable-next-line sort-keys
Severity: Minor
Found in packages/types/src/create/createType.spec.ts and 1 other location - About 40 mins to fix
packages/types/src/create/createType.spec.ts on lines 233..243

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

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

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

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

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

Refactorings

Further Reading

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

export interface ContractInstantiateResultTo299 extends Result<InstantiateReturnValueOk, Null> {
  readonly isErr: boolean;
  readonly isOk: boolean;
  readonly asOk: InstantiateReturnValueOk;
}
Severity: Minor
Found in packages/types/src/interfaces/contracts/types.ts and 1 other location - About 40 mins to fix
packages/types/src/interfaces/contracts/types.ts on lines 159..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 49.

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

      : api.query.staking.erasStakersPaged
        ? api.query.staking.erasStakersPaged.entries<Option<SpStakingExposurePage>>(era).pipe(
          map((r) => setEraCache(cacheKey, withActive, mapStakersPaged(era, r)))
        )
        : api.query.staking.erasStakersClipped.entries(era).pipe(
Severity: Minor
Found in packages/api-derive/src/staking/erasExposure.ts and 1 other location - About 40 mins to fix
packages/api-derive/src/staking/erasPrefs.ts on lines 32..36

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

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

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

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

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

Refactorings

Further Reading

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

  interface SpNposElectionsSupport extends Struct {
    readonly total: u128;
    readonly voters: Vec<ITuple<[AccountId32, u128]>>;
  }
Severity: Minor
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 40 mins to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 7645..7648

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

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

        items: lookup.getSiType(moduleMetadata.errors.unwrap().type).def.asVariant.variants
          .sort(sortByName)
          .map((error) => ({
            interface: '`' + `api.errors.${stringCamelCase(moduleMetadata.name)}.${error.name.toString()}.is` + '`',
            name: error.name.toString(),
Severity: Minor
Found in packages/typegen/src/metadataMd.ts and 1 other location - About 40 mins to fix
packages/typegen/src/metadataMd.ts on lines 407..420

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

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

  XcmV2MultiassetAssetInstance: {
    _enum: {
      Undefined: 'Null',
      Index: 'Compact<u128>',
      Array4: '[u8;4]',
Severity: Minor
Found in packages/types-augment/src/lookup/polkadot.ts and 1 other location - About 40 mins to fix
packages/types-augment/src/lookup/substrate.ts on lines 3319..3329

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

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

        reserveEmpty.map((e) =>
          e ? api.registry.createType<Vec<PalletBalancesReserveData>>('Vec<PalletBalancesReserveData>') : reserves[++offsetReserve]
        )
Severity: Minor
Found in packages/api-derive/src/balances/all.ts and 1 other location - About 40 mins to fix
packages/api-derive/src/balances/all.ts on lines 200..202

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

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

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

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

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

Refactorings

Further Reading

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

  interface PalletSocietyPayoutRecord extends Struct {
    readonly paid: u128;
    readonly payouts: Vec<ITuple<[u32, u128]>>;
  }
Severity: Minor
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 40 mins to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 2786..2789

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

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

    utility: {
      /**
       * Too many calls batched.
       **/
      TooManyCalls: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 10 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 264..273
packages/api-augment/src/kusama/errors.ts on lines 2184..2193
packages/api-augment/src/kusama/errors.ts on lines 2221..2230
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1588..1597
packages/api-augment/src/substrate/errors.ts on lines 2973..2982
packages/api-augment/src/substrate/errors.ts on lines 3029..3038
packages/api-augment/src/substrate/errors.ts on lines 3380..3389

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

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

    configuration: {
      /**
       * The new value for a configuration parameter is invalid.
       **/
      InvalidNewValue: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 10 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 264..273
packages/api-augment/src/kusama/errors.ts on lines 2184..2193
packages/api-augment/src/kusama/errors.ts on lines 2221..2230
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1588..1597
packages/api-augment/src/substrate/errors.ts on lines 2973..2982
packages/api-augment/src/substrate/errors.ts on lines 3029..3038
packages/api-augment/src/substrate/errors.ts on lines 3343..3352
packages/api-augment/src/substrate/errors.ts on lines 3380..3389

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

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

    sudo: {
      /**
       * Sender must be the Sudo account.
       **/
      RequireSudo: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 10 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 264..273
packages/api-augment/src/kusama/errors.ts on lines 2184..2193
packages/api-augment/src/kusama/errors.ts on lines 2221..2230
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1588..1597
packages/api-augment/src/substrate/errors.ts on lines 3029..3038
packages/api-augment/src/substrate/errors.ts on lines 3343..3352
packages/api-augment/src/substrate/errors.ts on lines 3380..3389

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

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

    utility: {
      /**
       * Too many calls batched.
       **/
      TooManyCalls: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 10 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 264..273
packages/api-augment/src/kusama/errors.ts on lines 2184..2193
packages/api-augment/src/kusama/errors.ts on lines 2221..2230
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1588..1597
packages/api-augment/src/substrate/errors.ts on lines 2973..2982
packages/api-augment/src/substrate/errors.ts on lines 3029..3038
packages/api-augment/src/substrate/errors.ts on lines 3343..3352
packages/api-augment/src/substrate/errors.ts on lines 3380..3389

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

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

    multiBlockMigrations: {
      /**
       * The operation cannot complete since some MBMs are ongoing.
       **/
      Ongoing: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 10 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 264..273
packages/api-augment/src/kusama/errors.ts on lines 2184..2193
packages/api-augment/src/kusama/errors.ts on lines 2221..2230
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 2973..2982
packages/api-augment/src/substrate/errors.ts on lines 3029..3038
packages/api-augment/src/substrate/errors.ts on lines 3343..3352
packages/api-augment/src/substrate/errors.ts on lines 3380..3389

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

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

    configuration: {
      /**
       * The new value for a configuration parameter is invalid.
       **/
      InvalidNewValue: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 10 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 2184..2193
packages/api-augment/src/kusama/errors.ts on lines 2221..2230
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1588..1597
packages/api-augment/src/substrate/errors.ts on lines 2973..2982
packages/api-augment/src/substrate/errors.ts on lines 3029..3038
packages/api-augment/src/substrate/errors.ts on lines 3343..3352
packages/api-augment/src/substrate/errors.ts on lines 3380..3389

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

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

    voterList: {
      /**
       * A error in the list interface implementation.
       **/
      List: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 10 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 264..273
packages/api-augment/src/kusama/errors.ts on lines 2184..2193
packages/api-augment/src/kusama/errors.ts on lines 2221..2230
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/substrate/errors.ts on lines 1588..1597
packages/api-augment/src/substrate/errors.ts on lines 2973..2982
packages/api-augment/src/substrate/errors.ts on lines 3029..3038
packages/api-augment/src/substrate/errors.ts on lines 3343..3352
packages/api-augment/src/substrate/errors.ts on lines 3380..3389

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

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

    voterList: {
      /**
       * A error in the list interface implementation.
       **/
      List: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 10 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 264..273
packages/api-augment/src/kusama/errors.ts on lines 2184..2193
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1588..1597
packages/api-augment/src/substrate/errors.ts on lines 2973..2982
packages/api-augment/src/substrate/errors.ts on lines 3029..3038
packages/api-augment/src/substrate/errors.ts on lines 3343..3352
packages/api-augment/src/substrate/errors.ts on lines 3380..3389

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

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

    utility: {
      /**
       * Too many calls batched.
       **/
      TooManyCalls: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 10 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 264..273
packages/api-augment/src/kusama/errors.ts on lines 2221..2230
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1588..1597
packages/api-augment/src/substrate/errors.ts on lines 2973..2982
packages/api-augment/src/substrate/errors.ts on lines 3029..3038
packages/api-augment/src/substrate/errors.ts on lines 3343..3352
packages/api-augment/src/substrate/errors.ts on lines 3380..3389

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

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

    voterList: {
      /**
       * A error in the list interface implementation.
       **/
      List: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 10 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 264..273
packages/api-augment/src/kusama/errors.ts on lines 2184..2193
packages/api-augment/src/kusama/errors.ts on lines 2221..2230
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1588..1597
packages/api-augment/src/substrate/errors.ts on lines 2973..2982
packages/api-augment/src/substrate/errors.ts on lines 3029..3038
packages/api-augment/src/substrate/errors.ts on lines 3343..3352

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

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

    tasksExample: {
      /**
       * The referenced task was not found.
       **/
      NotFound: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 10 other locations - About 40 mins to fix
packages/api-augment/src/kusama/errors.ts on lines 264..273
packages/api-augment/src/kusama/errors.ts on lines 2184..2193
packages/api-augment/src/kusama/errors.ts on lines 2221..2230
packages/api-augment/src/polkadot/errors.ts on lines 260..269
packages/api-augment/src/polkadot/errors.ts on lines 1848..1857
packages/api-augment/src/polkadot/errors.ts on lines 1885..1894
packages/api-augment/src/substrate/errors.ts on lines 1588..1597
packages/api-augment/src/substrate/errors.ts on lines 2973..2982
packages/api-augment/src/substrate/errors.ts on lines 3343..3352
packages/api-augment/src/substrate/errors.ts on lines 3380..3389

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

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