polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

    authorship: {
      /**
       * Author of current block.
       **/
      author: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
Severity: Major
Found in packages/api-augment/src/substrate/query.ts and 4 other locations - About 2 hrs to fix
packages/api-augment/src/kusama/query.ts on lines 76..85
packages/api-augment/src/polkadot/query.ts on lines 77..86
packages/api-augment/src/substrate/query.ts on lines 1546..1557
packages/api-augment/src/substrate/query.ts on lines 2185..2194

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

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 function generateDefaultEvents (dest: string, data: HexString, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
  const { metadata } = initMeta(data, extraTypes);

  return generateForMeta(metadata, dest, extraTypes, isStrict, customLookupDefinitions);
}
Severity: Major
Found in packages/typegen/src/generate/events.ts and 1 other location - About 2 hrs to fix
packages/typegen/src/generate/consts.ts on lines 88..92

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

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

    return hashers.length === 1
      ? createKeyInspect(registry, itemFn, { args, hashers, keys: [key] })
      : createKeyInspect(registry, itemFn, { args, hashers, keys: registry.lookup.getSiType(key).def.asTuple });
packages/types/src/metadata/decorate/storage/createFunction.ts on lines 172..174

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

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 function generateDefaultConsts (dest: string, data: HexString, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
  const { metadata } = initMeta(data, extraTypes);

  return generateForMeta(metadata, dest, extraTypes, isStrict, customLookupDefinitions);
}
Severity: Major
Found in packages/typegen/src/generate/consts.ts and 1 other location - About 2 hrs to fix
packages/typegen/src/generate/events.ts on lines 129..133

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

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

    return hashers.length === 1
      ? createKey(registry, itemFn, { args, hashers, keys: [key] })
      : createKey(registry, itemFn, { args, hashers, keys: registry.lookup.getSiType(key).def.asTuple });
packages/types/src/metadata/decorate/storage/createFunction.ts on lines 144..146

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

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

  [
    22515962,
    1001003,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 24 other locations - About 2 hrs to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4618..4699
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4700..4781
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4864..4945
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4946..5027
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5028..5109
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5110..5191
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5192..5273
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3138..3219
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3220..3301
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3302..3383
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3384..3465
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3466..3547
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3548..3629
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3630..3711
packages/types-known/src/upgrades/e2e/westend.ts on lines 4600..4681
packages/types-known/src/upgrades/e2e/westend.ts on lines 4682..4763
packages/types-known/src/upgrades/e2e/westend.ts on lines 4764..4845
packages/types-known/src/upgrades/e2e/westend.ts on lines 4846..4927
packages/types-known/src/upgrades/e2e/westend.ts on lines 4928..5009
packages/types-known/src/upgrades/e2e/westend.ts on lines 5010..5091
packages/types-known/src/upgrades/e2e/westend.ts on lines 5092..5173
packages/types-known/src/upgrades/e2e/westend.ts on lines 5174..5255
packages/types-known/src/upgrades/e2e/westend.ts on lines 5256..5337
packages/types-known/src/upgrades/e2e/westend.ts on lines 5338..5419

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

  [
    22790000,
    1002000,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 24 other locations - About 2 hrs to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4618..4699
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4700..4781
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4782..4863
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4946..5027
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5028..5109
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5110..5191
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5192..5273
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3138..3219
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3220..3301
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3302..3383
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3384..3465
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3466..3547
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3548..3629
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3630..3711
packages/types-known/src/upgrades/e2e/westend.ts on lines 4600..4681
packages/types-known/src/upgrades/e2e/westend.ts on lines 4682..4763
packages/types-known/src/upgrades/e2e/westend.ts on lines 4764..4845
packages/types-known/src/upgrades/e2e/westend.ts on lines 4846..4927
packages/types-known/src/upgrades/e2e/westend.ts on lines 4928..5009
packages/types-known/src/upgrades/e2e/westend.ts on lines 5010..5091
packages/types-known/src/upgrades/e2e/westend.ts on lines 5092..5173
packages/types-known/src/upgrades/e2e/westend.ts on lines 5174..5255
packages/types-known/src/upgrades/e2e/westend.ts on lines 5256..5337
packages/types-known/src/upgrades/e2e/westend.ts on lines 5338..5419

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

  [
    21169168,
    1002004,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/polkadot.ts and 24 other locations - About 2 hrs to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4618..4699
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4700..4781
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4782..4863
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4864..4945
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4946..5027
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5028..5109
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5110..5191
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5192..5273
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3138..3219
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3220..3301
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3302..3383
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3466..3547
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3548..3629
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3630..3711
packages/types-known/src/upgrades/e2e/westend.ts on lines 4600..4681
packages/types-known/src/upgrades/e2e/westend.ts on lines 4682..4763
packages/types-known/src/upgrades/e2e/westend.ts on lines 4764..4845
packages/types-known/src/upgrades/e2e/westend.ts on lines 4846..4927
packages/types-known/src/upgrades/e2e/westend.ts on lines 4928..5009
packages/types-known/src/upgrades/e2e/westend.ts on lines 5010..5091
packages/types-known/src/upgrades/e2e/westend.ts on lines 5092..5173
packages/types-known/src/upgrades/e2e/westend.ts on lines 5174..5255
packages/types-known/src/upgrades/e2e/westend.ts on lines 5256..5337
packages/types-known/src/upgrades/e2e/westend.ts on lines 5338..5419

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

  [
    20056997,
    1009000,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 2 hrs to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4618..4699
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4700..4781
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4782..4863
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4864..4945
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4946..5027
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5028..5109
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5110..5191
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5192..5273
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3138..3219
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3220..3301
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3302..3383
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3384..3465
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3466..3547
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3548..3629
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3630..3711
packages/types-known/src/upgrades/e2e/westend.ts on lines 4600..4681
packages/types-known/src/upgrades/e2e/westend.ts on lines 4682..4763
packages/types-known/src/upgrades/e2e/westend.ts on lines 4764..4845
packages/types-known/src/upgrades/e2e/westend.ts on lines 4846..4927
packages/types-known/src/upgrades/e2e/westend.ts on lines 4928..5009
packages/types-known/src/upgrades/e2e/westend.ts on lines 5010..5091
packages/types-known/src/upgrades/e2e/westend.ts on lines 5092..5173
packages/types-known/src/upgrades/e2e/westend.ts on lines 5174..5255
packages/types-known/src/upgrades/e2e/westend.ts on lines 5256..5337

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

  [
    23176015,
    1002001,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 24 other locations - About 2 hrs to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4618..4699
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4700..4781
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4782..4863
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4864..4945
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5028..5109
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5110..5191
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5192..5273
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3138..3219
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3220..3301
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3302..3383
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3384..3465
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3466..3547
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3548..3629
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3630..3711
packages/types-known/src/upgrades/e2e/westend.ts on lines 4600..4681
packages/types-known/src/upgrades/e2e/westend.ts on lines 4682..4763
packages/types-known/src/upgrades/e2e/westend.ts on lines 4764..4845
packages/types-known/src/upgrades/e2e/westend.ts on lines 4846..4927
packages/types-known/src/upgrades/e2e/westend.ts on lines 4928..5009
packages/types-known/src/upgrades/e2e/westend.ts on lines 5010..5091
packages/types-known/src/upgrades/e2e/westend.ts on lines 5092..5173
packages/types-known/src/upgrades/e2e/westend.ts on lines 5174..5255
packages/types-known/src/upgrades/e2e/westend.ts on lines 5256..5337
packages/types-known/src/upgrades/e2e/westend.ts on lines 5338..5419

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

  [
    19234157,
    1006001,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 2 hrs to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4618..4699
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4700..4781
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4782..4863
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4864..4945
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4946..5027
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5028..5109
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5110..5191
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5192..5273
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3138..3219
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3220..3301
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3302..3383
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3384..3465
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3466..3547
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3548..3629
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3630..3711
packages/types-known/src/upgrades/e2e/westend.ts on lines 4600..4681
packages/types-known/src/upgrades/e2e/westend.ts on lines 4682..4763
packages/types-known/src/upgrades/e2e/westend.ts on lines 4764..4845
packages/types-known/src/upgrades/e2e/westend.ts on lines 4846..4927
packages/types-known/src/upgrades/e2e/westend.ts on lines 4928..5009
packages/types-known/src/upgrades/e2e/westend.ts on lines 5092..5173
packages/types-known/src/upgrades/e2e/westend.ts on lines 5174..5255
packages/types-known/src/upgrades/e2e/westend.ts on lines 5256..5337
packages/types-known/src/upgrades/e2e/westend.ts on lines 5338..5419

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

  [
    19542944,
    1007000,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 2 hrs to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4618..4699
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4700..4781
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4782..4863
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4864..4945
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4946..5027
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5028..5109
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5110..5191
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5192..5273
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3138..3219
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3220..3301
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3302..3383
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3384..3465
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3466..3547
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3548..3629
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3630..3711
packages/types-known/src/upgrades/e2e/westend.ts on lines 4600..4681
packages/types-known/src/upgrades/e2e/westend.ts on lines 4682..4763
packages/types-known/src/upgrades/e2e/westend.ts on lines 4764..4845
packages/types-known/src/upgrades/e2e/westend.ts on lines 4846..4927
packages/types-known/src/upgrades/e2e/westend.ts on lines 4928..5009
packages/types-known/src/upgrades/e2e/westend.ts on lines 5010..5091
packages/types-known/src/upgrades/e2e/westend.ts on lines 5174..5255
packages/types-known/src/upgrades/e2e/westend.ts on lines 5256..5337
packages/types-known/src/upgrades/e2e/westend.ts on lines 5338..5419

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

  [
    18293984,
    102000,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 2 hrs to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4618..4699
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4700..4781
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4782..4863
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4864..4945
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4946..5027
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5028..5109
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5110..5191
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5192..5273
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3138..3219
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3220..3301
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3302..3383
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3384..3465
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3466..3547
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3548..3629
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3630..3711
packages/types-known/src/upgrades/e2e/westend.ts on lines 4682..4763
packages/types-known/src/upgrades/e2e/westend.ts on lines 4764..4845
packages/types-known/src/upgrades/e2e/westend.ts on lines 4846..4927
packages/types-known/src/upgrades/e2e/westend.ts on lines 4928..5009
packages/types-known/src/upgrades/e2e/westend.ts on lines 5010..5091
packages/types-known/src/upgrades/e2e/westend.ts on lines 5092..5173
packages/types-known/src/upgrades/e2e/westend.ts on lines 5174..5255
packages/types-known/src/upgrades/e2e/westend.ts on lines 5256..5337
packages/types-known/src/upgrades/e2e/westend.ts on lines 5338..5419

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

  [
    18451783,
    104000,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 2 hrs to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4618..4699
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4700..4781
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4782..4863
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4864..4945
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4946..5027
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5028..5109
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5110..5191
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5192..5273
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3138..3219
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3220..3301
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3302..3383
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3384..3465
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3466..3547
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3548..3629
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3630..3711
packages/types-known/src/upgrades/e2e/westend.ts on lines 4600..4681
packages/types-known/src/upgrades/e2e/westend.ts on lines 4682..4763
packages/types-known/src/upgrades/e2e/westend.ts on lines 4846..4927
packages/types-known/src/upgrades/e2e/westend.ts on lines 4928..5009
packages/types-known/src/upgrades/e2e/westend.ts on lines 5010..5091
packages/types-known/src/upgrades/e2e/westend.ts on lines 5092..5173
packages/types-known/src/upgrades/e2e/westend.ts on lines 5174..5255
packages/types-known/src/upgrades/e2e/westend.ts on lines 5256..5337
packages/types-known/src/upgrades/e2e/westend.ts on lines 5338..5419

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

  [
    18679741,
    1005000,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 2 hrs to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4618..4699
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4700..4781
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4782..4863
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4864..4945
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4946..5027
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5028..5109
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5110..5191
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5192..5273
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3138..3219
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3220..3301
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3302..3383
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3384..3465
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3466..3547
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3548..3629
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3630..3711
packages/types-known/src/upgrades/e2e/westend.ts on lines 4600..4681
packages/types-known/src/upgrades/e2e/westend.ts on lines 4682..4763
packages/types-known/src/upgrades/e2e/westend.ts on lines 4764..4845
packages/types-known/src/upgrades/e2e/westend.ts on lines 4928..5009
packages/types-known/src/upgrades/e2e/westend.ts on lines 5010..5091
packages/types-known/src/upgrades/e2e/westend.ts on lines 5092..5173
packages/types-known/src/upgrades/e2e/westend.ts on lines 5174..5255
packages/types-known/src/upgrades/e2e/westend.ts on lines 5256..5337
packages/types-known/src/upgrades/e2e/westend.ts on lines 5338..5419

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

  [
    19621258,
    1007001,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 24 other locations - About 2 hrs to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4618..4699
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4700..4781
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4782..4863
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4864..4945
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4946..5027
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5028..5109
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5110..5191
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5192..5273
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3138..3219
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3220..3301
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3302..3383
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3384..3465
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3466..3547
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3548..3629
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3630..3711
packages/types-known/src/upgrades/e2e/westend.ts on lines 4600..4681
packages/types-known/src/upgrades/e2e/westend.ts on lines 4682..4763
packages/types-known/src/upgrades/e2e/westend.ts on lines 4764..4845
packages/types-known/src/upgrades/e2e/westend.ts on lines 4846..4927
packages/types-known/src/upgrades/e2e/westend.ts on lines 4928..5009
packages/types-known/src/upgrades/e2e/westend.ts on lines 5010..5091
packages/types-known/src/upgrades/e2e/westend.ts on lines 5092..5173
packages/types-known/src/upgrades/e2e/westend.ts on lines 5256..5337
packages/types-known/src/upgrades/e2e/westend.ts on lines 5338..5419

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

  [
    23450253,
    1002004,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 24 other locations - About 2 hrs to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4618..4699
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4700..4781
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4782..4863
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4864..4945
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4946..5027
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5110..5191
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5192..5273
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3138..3219
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3220..3301
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3302..3383
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3384..3465
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3466..3547
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3548..3629
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3630..3711
packages/types-known/src/upgrades/e2e/westend.ts on lines 4600..4681
packages/types-known/src/upgrades/e2e/westend.ts on lines 4682..4763
packages/types-known/src/upgrades/e2e/westend.ts on lines 4764..4845
packages/types-known/src/upgrades/e2e/westend.ts on lines 4846..4927
packages/types-known/src/upgrades/e2e/westend.ts on lines 4928..5009
packages/types-known/src/upgrades/e2e/westend.ts on lines 5010..5091
packages/types-known/src/upgrades/e2e/westend.ts on lines 5092..5173
packages/types-known/src/upgrades/e2e/westend.ts on lines 5174..5255
packages/types-known/src/upgrades/e2e/westend.ts on lines 5256..5337
packages/types-known/src/upgrades/e2e/westend.ts on lines 5338..5419

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

  [
    19551000,
    1001002,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/polkadot.ts and 24 other locations - About 2 hrs to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4618..4699
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4700..4781
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4782..4863
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4864..4945
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4946..5027
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5028..5109
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5110..5191
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5192..5273
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3220..3301
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3302..3383
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3384..3465
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3466..3547
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3548..3629
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3630..3711
packages/types-known/src/upgrades/e2e/westend.ts on lines 4600..4681
packages/types-known/src/upgrades/e2e/westend.ts on lines 4682..4763
packages/types-known/src/upgrades/e2e/westend.ts on lines 4764..4845
packages/types-known/src/upgrades/e2e/westend.ts on lines 4846..4927
packages/types-known/src/upgrades/e2e/westend.ts on lines 4928..5009
packages/types-known/src/upgrades/e2e/westend.ts on lines 5010..5091
packages/types-known/src/upgrades/e2e/westend.ts on lines 5092..5173
packages/types-known/src/upgrades/e2e/westend.ts on lines 5174..5255
packages/types-known/src/upgrades/e2e/westend.ts on lines 5256..5337
packages/types-known/src/upgrades/e2e/westend.ts on lines 5338..5419

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

  [
    21800141,
    1002007,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/polkadot.ts and 24 other locations - About 2 hrs to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4618..4699
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4700..4781
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4782..4863
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4864..4945
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4946..5027
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5028..5109
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5110..5191
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5192..5273
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3138..3219
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3220..3301
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3302..3383
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3384..3465
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3466..3547
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3548..3629
packages/types-known/src/upgrades/e2e/westend.ts on lines 4600..4681
packages/types-known/src/upgrades/e2e/westend.ts on lines 4682..4763
packages/types-known/src/upgrades/e2e/westend.ts on lines 4764..4845
packages/types-known/src/upgrades/e2e/westend.ts on lines 4846..4927
packages/types-known/src/upgrades/e2e/westend.ts on lines 4928..5009
packages/types-known/src/upgrades/e2e/westend.ts on lines 5010..5091
packages/types-known/src/upgrades/e2e/westend.ts on lines 5092..5173
packages/types-known/src/upgrades/e2e/westend.ts on lines 5174..5255
packages/types-known/src/upgrades/e2e/westend.ts on lines 5256..5337
packages/types-known/src/upgrades/e2e/westend.ts on lines 5338..5419

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

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

  [
    21570000,
    1001000,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 24 other locations - About 2 hrs to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4700..4781
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4782..4863
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4864..4945
packages/types-known/src/upgrades/e2e/kusama.ts on lines 4946..5027
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5028..5109
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5110..5191
packages/types-known/src/upgrades/e2e/kusama.ts on lines 5192..5273
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3138..3219
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3220..3301
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3302..3383
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3384..3465
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3466..3547
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3548..3629
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 3630..3711
packages/types-known/src/upgrades/e2e/westend.ts on lines 4600..4681
packages/types-known/src/upgrades/e2e/westend.ts on lines 4682..4763
packages/types-known/src/upgrades/e2e/westend.ts on lines 4764..4845
packages/types-known/src/upgrades/e2e/westend.ts on lines 4846..4927
packages/types-known/src/upgrades/e2e/westend.ts on lines 4928..5009
packages/types-known/src/upgrades/e2e/westend.ts on lines 5010..5091
packages/types-known/src/upgrades/e2e/westend.ts on lines 5092..5173
packages/types-known/src/upgrades/e2e/westend.ts on lines 5174..5255
packages/types-known/src/upgrades/e2e/westend.ts on lines 5256..5337
packages/types-known/src/upgrades/e2e/westend.ts on lines 5338..5419

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language