polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

  [
    5784566,
    9030,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 68 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2332..2393
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2394..2455
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2456..2517
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2518..2579
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2580..2641
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2642..2703
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2704..2765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2766..2827
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2828..2889
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2890..2951
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2952..3013
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3014..3075
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3076..3137
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3138..3199
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3200..3261
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3262..3323
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3324..3385
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3386..3447
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3448..3509
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3510..3571
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3572..3633
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3634..3695
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1306..1367
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1368..1429
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1430..1491
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1492..1553
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1554..1615
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1616..1677
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1678..1739
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1740..1801
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1802..1863
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1864..1925
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1926..1987
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1988..2049
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2050..2111
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2112..2173
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2174..2235
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2236..2297
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2298..2359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1468..1529
packages/types-known/src/upgrades/e2e/westend.ts on lines 1530..1591
packages/types-known/src/upgrades/e2e/westend.ts on lines 1654..1715
packages/types-known/src/upgrades/e2e/westend.ts on lines 1716..1777
packages/types-known/src/upgrades/e2e/westend.ts on lines 1778..1839
packages/types-known/src/upgrades/e2e/westend.ts on lines 1840..1901
packages/types-known/src/upgrades/e2e/westend.ts on lines 1902..1963
packages/types-known/src/upgrades/e2e/westend.ts on lines 1964..2025
packages/types-known/src/upgrades/e2e/westend.ts on lines 2026..2087
packages/types-known/src/upgrades/e2e/westend.ts on lines 2088..2149
packages/types-known/src/upgrades/e2e/westend.ts on lines 2150..2211
packages/types-known/src/upgrades/e2e/westend.ts on lines 2212..2273
packages/types-known/src/upgrades/e2e/westend.ts on lines 2274..2335
packages/types-known/src/upgrades/e2e/westend.ts on lines 2336..2397
packages/types-known/src/upgrades/e2e/westend.ts on lines 2398..2459
packages/types-known/src/upgrades/e2e/westend.ts on lines 2460..2521
packages/types-known/src/upgrades/e2e/westend.ts on lines 2522..2583
packages/types-known/src/upgrades/e2e/westend.ts on lines 2584..2645
packages/types-known/src/upgrades/e2e/westend.ts on lines 2646..2707
packages/types-known/src/upgrades/e2e/westend.ts on lines 2708..2769
packages/types-known/src/upgrades/e2e/westend.ts on lines 2770..2831
packages/types-known/src/upgrades/e2e/westend.ts on lines 2832..2893
packages/types-known/src/upgrades/e2e/westend.ts on lines 2894..2955
packages/types-known/src/upgrades/e2e/westend.ts on lines 2956..3017
packages/types-known/src/upgrades/e2e/westend.ts on lines 3018..3079
packages/types-known/src/upgrades/e2e/westend.ts on lines 3080..3141
packages/types-known/src/upgrades/e2e/westend.ts on lines 3142..3203
packages/types-known/src/upgrades/e2e/westend.ts on lines 3204..3265
packages/types-known/src/upgrades/e2e/westend.ts on lines 3266..3327

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

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

  [
    7568453,
    9100,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 68 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2332..2393
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2394..2455
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2456..2517
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2518..2579
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2580..2641
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2642..2703
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2704..2765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2766..2827
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2828..2889
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2890..2951
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2952..3013
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3014..3075
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3076..3137
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3138..3199
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3200..3261
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3262..3323
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3324..3385
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3386..3447
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3448..3509
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3510..3571
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3572..3633
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3634..3695
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1306..1367
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1368..1429
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1430..1491
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1492..1553
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1554..1615
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1616..1677
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1678..1739
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1740..1801
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1802..1863
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1864..1925
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1926..1987
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1988..2049
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2050..2111
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2112..2173
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2174..2235
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2236..2297
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2298..2359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1468..1529
packages/types-known/src/upgrades/e2e/westend.ts on lines 1530..1591
packages/types-known/src/upgrades/e2e/westend.ts on lines 1592..1653
packages/types-known/src/upgrades/e2e/westend.ts on lines 1654..1715
packages/types-known/src/upgrades/e2e/westend.ts on lines 1716..1777
packages/types-known/src/upgrades/e2e/westend.ts on lines 1778..1839
packages/types-known/src/upgrades/e2e/westend.ts on lines 1840..1901
packages/types-known/src/upgrades/e2e/westend.ts on lines 1902..1963
packages/types-known/src/upgrades/e2e/westend.ts on lines 1964..2025
packages/types-known/src/upgrades/e2e/westend.ts on lines 2026..2087
packages/types-known/src/upgrades/e2e/westend.ts on lines 2150..2211
packages/types-known/src/upgrades/e2e/westend.ts on lines 2212..2273
packages/types-known/src/upgrades/e2e/westend.ts on lines 2274..2335
packages/types-known/src/upgrades/e2e/westend.ts on lines 2336..2397
packages/types-known/src/upgrades/e2e/westend.ts on lines 2398..2459
packages/types-known/src/upgrades/e2e/westend.ts on lines 2460..2521
packages/types-known/src/upgrades/e2e/westend.ts on lines 2522..2583
packages/types-known/src/upgrades/e2e/westend.ts on lines 2584..2645
packages/types-known/src/upgrades/e2e/westend.ts on lines 2646..2707
packages/types-known/src/upgrades/e2e/westend.ts on lines 2708..2769
packages/types-known/src/upgrades/e2e/westend.ts on lines 2770..2831
packages/types-known/src/upgrades/e2e/westend.ts on lines 2832..2893
packages/types-known/src/upgrades/e2e/westend.ts on lines 2894..2955
packages/types-known/src/upgrades/e2e/westend.ts on lines 2956..3017
packages/types-known/src/upgrades/e2e/westend.ts on lines 3018..3079
packages/types-known/src/upgrades/e2e/westend.ts on lines 3080..3141
packages/types-known/src/upgrades/e2e/westend.ts on lines 3142..3203
packages/types-known/src/upgrades/e2e/westend.ts on lines 3204..3265
packages/types-known/src/upgrades/e2e/westend.ts on lines 3266..3327

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

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

  [
    11584820,
    9251,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 68 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2332..2393
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2394..2455
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2456..2517
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2518..2579
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2580..2641
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2642..2703
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2704..2765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2766..2827
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2828..2889
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2890..2951
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2952..3013
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3014..3075
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3076..3137
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3138..3199
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3200..3261
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3262..3323
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3324..3385
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3386..3447
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3448..3509
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3510..3571
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3572..3633
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3634..3695
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1306..1367
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1368..1429
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1430..1491
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1492..1553
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1554..1615
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1616..1677
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1678..1739
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1740..1801
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1802..1863
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1864..1925
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1926..1987
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1988..2049
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2050..2111
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2112..2173
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2174..2235
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2236..2297
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2298..2359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1468..1529
packages/types-known/src/upgrades/e2e/westend.ts on lines 1530..1591
packages/types-known/src/upgrades/e2e/westend.ts on lines 1592..1653
packages/types-known/src/upgrades/e2e/westend.ts on lines 1654..1715
packages/types-known/src/upgrades/e2e/westend.ts on lines 1716..1777
packages/types-known/src/upgrades/e2e/westend.ts on lines 1778..1839
packages/types-known/src/upgrades/e2e/westend.ts on lines 1840..1901
packages/types-known/src/upgrades/e2e/westend.ts on lines 1902..1963
packages/types-known/src/upgrades/e2e/westend.ts on lines 1964..2025
packages/types-known/src/upgrades/e2e/westend.ts on lines 2026..2087
packages/types-known/src/upgrades/e2e/westend.ts on lines 2088..2149
packages/types-known/src/upgrades/e2e/westend.ts on lines 2150..2211
packages/types-known/src/upgrades/e2e/westend.ts on lines 2212..2273
packages/types-known/src/upgrades/e2e/westend.ts on lines 2274..2335
packages/types-known/src/upgrades/e2e/westend.ts on lines 2336..2397
packages/types-known/src/upgrades/e2e/westend.ts on lines 2398..2459
packages/types-known/src/upgrades/e2e/westend.ts on lines 2460..2521
packages/types-known/src/upgrades/e2e/westend.ts on lines 2522..2583
packages/types-known/src/upgrades/e2e/westend.ts on lines 2584..2645
packages/types-known/src/upgrades/e2e/westend.ts on lines 2646..2707
packages/types-known/src/upgrades/e2e/westend.ts on lines 2708..2769
packages/types-known/src/upgrades/e2e/westend.ts on lines 2770..2831
packages/types-known/src/upgrades/e2e/westend.ts on lines 2832..2893
packages/types-known/src/upgrades/e2e/westend.ts on lines 2894..2955
packages/types-known/src/upgrades/e2e/westend.ts on lines 2956..3017
packages/types-known/src/upgrades/e2e/westend.ts on lines 3018..3079
packages/types-known/src/upgrades/e2e/westend.ts on lines 3080..3141
packages/types-known/src/upgrades/e2e/westend.ts on lines 3204..3265
packages/types-known/src/upgrades/e2e/westend.ts on lines 3266..3327

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

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

  [
    6321619,
    9080,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/polkadot.ts and 68 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2332..2393
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2394..2455
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2456..2517
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2518..2579
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2580..2641
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2642..2703
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2704..2765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2766..2827
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2828..2889
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2890..2951
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2952..3013
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3014..3075
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3076..3137
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3138..3199
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3200..3261
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3262..3323
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3324..3385
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3386..3447
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3448..3509
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3510..3571
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3572..3633
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3634..3695
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1306..1367
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1430..1491
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1492..1553
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1554..1615
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1616..1677
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1678..1739
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1740..1801
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1802..1863
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1864..1925
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1926..1987
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1988..2049
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2050..2111
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2112..2173
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2174..2235
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2236..2297
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2298..2359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1468..1529
packages/types-known/src/upgrades/e2e/westend.ts on lines 1530..1591
packages/types-known/src/upgrades/e2e/westend.ts on lines 1592..1653
packages/types-known/src/upgrades/e2e/westend.ts on lines 1654..1715
packages/types-known/src/upgrades/e2e/westend.ts on lines 1716..1777
packages/types-known/src/upgrades/e2e/westend.ts on lines 1778..1839
packages/types-known/src/upgrades/e2e/westend.ts on lines 1840..1901
packages/types-known/src/upgrades/e2e/westend.ts on lines 1902..1963
packages/types-known/src/upgrades/e2e/westend.ts on lines 1964..2025
packages/types-known/src/upgrades/e2e/westend.ts on lines 2026..2087
packages/types-known/src/upgrades/e2e/westend.ts on lines 2088..2149
packages/types-known/src/upgrades/e2e/westend.ts on lines 2150..2211
packages/types-known/src/upgrades/e2e/westend.ts on lines 2212..2273
packages/types-known/src/upgrades/e2e/westend.ts on lines 2274..2335
packages/types-known/src/upgrades/e2e/westend.ts on lines 2336..2397
packages/types-known/src/upgrades/e2e/westend.ts on lines 2398..2459
packages/types-known/src/upgrades/e2e/westend.ts on lines 2460..2521
packages/types-known/src/upgrades/e2e/westend.ts on lines 2522..2583
packages/types-known/src/upgrades/e2e/westend.ts on lines 2584..2645
packages/types-known/src/upgrades/e2e/westend.ts on lines 2646..2707
packages/types-known/src/upgrades/e2e/westend.ts on lines 2708..2769
packages/types-known/src/upgrades/e2e/westend.ts on lines 2770..2831
packages/types-known/src/upgrades/e2e/westend.ts on lines 2832..2893
packages/types-known/src/upgrades/e2e/westend.ts on lines 2894..2955
packages/types-known/src/upgrades/e2e/westend.ts on lines 2956..3017
packages/types-known/src/upgrades/e2e/westend.ts on lines 3018..3079
packages/types-known/src/upgrades/e2e/westend.ts on lines 3080..3141
packages/types-known/src/upgrades/e2e/westend.ts on lines 3142..3203
packages/types-known/src/upgrades/e2e/westend.ts on lines 3204..3265
packages/types-known/src/upgrades/e2e/westend.ts on lines 3266..3327

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

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

export interface AccountInfoWithTripleRefCount extends Struct {
  readonly nonce: Index;
  readonly consumers: RefCount;
  readonly providers: RefCount;
  readonly sufficients: RefCount;
Severity: Major
Found in packages/types/src/interfaces/system/types.ts and 18 other locations - About 1 hr to fix
packages/types/src/interfaces/assets/types.ts on lines 50..56
packages/types/src/interfaces/babe/types.ts on lines 137..143
packages/types/src/interfaces/bridges/types.ts on lines 120..126
packages/types/src/interfaces/contracts/types.ts on lines 73..79
packages/types/src/interfaces/contracts/types.ts on lines 132..138
packages/types/src/interfaces/contracts/types.ts on lines 150..156
packages/types/src/interfaces/contracts/types.ts on lines 173..179
packages/types/src/interfaces/contracts/types.ts on lines 462..468
packages/types/src/interfaces/contracts/types.ts on lines 510..516
packages/types/src/interfaces/democracy/types.ts on lines 111..117
packages/types/src/interfaces/democracy/types.ts on lines 136..142
packages/types/src/interfaces/grandpa/types.ts on lines 132..138
packages/types/src/interfaces/grandpa/types.ts on lines 172..178
packages/types/src/interfaces/imOnline/types.ts on lines 16..22
packages/types/src/interfaces/purchase/types.ts on lines 8..14
packages/types/src/interfaces/system/types.ts on lines 360..366
packages/types/src/interfaces/xcm/types.ts on lines 1409..1415
packages/types/src/interfaces/xcm/types.ts on lines 1542..1548

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

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

export interface RoundState extends Struct {
  readonly round: u32;
  readonly totalWeight: u32;
  readonly thresholdWeight: u32;
  readonly prevotes: Prevotes;
Severity: Major
Found in packages/types/src/interfaces/grandpa/types.ts and 18 other locations - About 1 hr to fix
packages/types/src/interfaces/assets/types.ts on lines 50..56
packages/types/src/interfaces/babe/types.ts on lines 137..143
packages/types/src/interfaces/bridges/types.ts on lines 120..126
packages/types/src/interfaces/contracts/types.ts on lines 73..79
packages/types/src/interfaces/contracts/types.ts on lines 132..138
packages/types/src/interfaces/contracts/types.ts on lines 150..156
packages/types/src/interfaces/contracts/types.ts on lines 173..179
packages/types/src/interfaces/contracts/types.ts on lines 462..468
packages/types/src/interfaces/contracts/types.ts on lines 510..516
packages/types/src/interfaces/democracy/types.ts on lines 111..117
packages/types/src/interfaces/democracy/types.ts on lines 136..142
packages/types/src/interfaces/grandpa/types.ts on lines 132..138
packages/types/src/interfaces/imOnline/types.ts on lines 16..22
packages/types/src/interfaces/purchase/types.ts on lines 8..14
packages/types/src/interfaces/system/types.ts on lines 39..45
packages/types/src/interfaces/system/types.ts on lines 360..366
packages/types/src/interfaces/xcm/types.ts on lines 1409..1415
packages/types/src/interfaces/xcm/types.ts on lines 1542..1548

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

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

  [
    12665416,
    9200,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 68 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2332..2393
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2394..2455
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2456..2517
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2518..2579
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2580..2641
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2642..2703
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2704..2765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2766..2827
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2828..2889
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2890..2951
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2952..3013
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3014..3075
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3076..3137
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3138..3199
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3200..3261
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3262..3323
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3324..3385
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3448..3509
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3510..3571
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3572..3633
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3634..3695
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1306..1367
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1368..1429
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1430..1491
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1492..1553
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1554..1615
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1616..1677
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1678..1739
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1740..1801
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1802..1863
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1864..1925
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1926..1987
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1988..2049
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2050..2111
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2112..2173
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2174..2235
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2236..2297
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2298..2359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1468..1529
packages/types-known/src/upgrades/e2e/westend.ts on lines 1530..1591
packages/types-known/src/upgrades/e2e/westend.ts on lines 1592..1653
packages/types-known/src/upgrades/e2e/westend.ts on lines 1654..1715
packages/types-known/src/upgrades/e2e/westend.ts on lines 1716..1777
packages/types-known/src/upgrades/e2e/westend.ts on lines 1778..1839
packages/types-known/src/upgrades/e2e/westend.ts on lines 1840..1901
packages/types-known/src/upgrades/e2e/westend.ts on lines 1902..1963
packages/types-known/src/upgrades/e2e/westend.ts on lines 1964..2025
packages/types-known/src/upgrades/e2e/westend.ts on lines 2026..2087
packages/types-known/src/upgrades/e2e/westend.ts on lines 2088..2149
packages/types-known/src/upgrades/e2e/westend.ts on lines 2150..2211
packages/types-known/src/upgrades/e2e/westend.ts on lines 2212..2273
packages/types-known/src/upgrades/e2e/westend.ts on lines 2274..2335
packages/types-known/src/upgrades/e2e/westend.ts on lines 2336..2397
packages/types-known/src/upgrades/e2e/westend.ts on lines 2398..2459
packages/types-known/src/upgrades/e2e/westend.ts on lines 2460..2521
packages/types-known/src/upgrades/e2e/westend.ts on lines 2522..2583
packages/types-known/src/upgrades/e2e/westend.ts on lines 2584..2645
packages/types-known/src/upgrades/e2e/westend.ts on lines 2646..2707
packages/types-known/src/upgrades/e2e/westend.ts on lines 2708..2769
packages/types-known/src/upgrades/e2e/westend.ts on lines 2770..2831
packages/types-known/src/upgrades/e2e/westend.ts on lines 2832..2893
packages/types-known/src/upgrades/e2e/westend.ts on lines 2894..2955
packages/types-known/src/upgrades/e2e/westend.ts on lines 2956..3017
packages/types-known/src/upgrades/e2e/westend.ts on lines 3018..3079
packages/types-known/src/upgrades/e2e/westend.ts on lines 3080..3141
packages/types-known/src/upgrades/e2e/westend.ts on lines 3142..3203
packages/types-known/src/upgrades/e2e/westend.ts on lines 3204..3265
packages/types-known/src/upgrades/e2e/westend.ts on lines 3266..3327

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

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

  [
    6210274,
    9070,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 68 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2332..2393
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2394..2455
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2456..2517
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2518..2579
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2580..2641
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2642..2703
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2704..2765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2766..2827
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2828..2889
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2890..2951
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2952..3013
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3014..3075
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3076..3137
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3138..3199
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3200..3261
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3262..3323
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3324..3385
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3386..3447
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3448..3509
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3510..3571
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3572..3633
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3634..3695
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1306..1367
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1368..1429
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1430..1491
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1492..1553
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1554..1615
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1616..1677
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1678..1739
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1740..1801
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1802..1863
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1864..1925
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1926..1987
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1988..2049
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2050..2111
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2112..2173
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2174..2235
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2236..2297
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2298..2359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1468..1529
packages/types-known/src/upgrades/e2e/westend.ts on lines 1530..1591
packages/types-known/src/upgrades/e2e/westend.ts on lines 1592..1653
packages/types-known/src/upgrades/e2e/westend.ts on lines 1654..1715
packages/types-known/src/upgrades/e2e/westend.ts on lines 1716..1777
packages/types-known/src/upgrades/e2e/westend.ts on lines 1778..1839
packages/types-known/src/upgrades/e2e/westend.ts on lines 1840..1901
packages/types-known/src/upgrades/e2e/westend.ts on lines 1964..2025
packages/types-known/src/upgrades/e2e/westend.ts on lines 2026..2087
packages/types-known/src/upgrades/e2e/westend.ts on lines 2088..2149
packages/types-known/src/upgrades/e2e/westend.ts on lines 2150..2211
packages/types-known/src/upgrades/e2e/westend.ts on lines 2212..2273
packages/types-known/src/upgrades/e2e/westend.ts on lines 2274..2335
packages/types-known/src/upgrades/e2e/westend.ts on lines 2336..2397
packages/types-known/src/upgrades/e2e/westend.ts on lines 2398..2459
packages/types-known/src/upgrades/e2e/westend.ts on lines 2460..2521
packages/types-known/src/upgrades/e2e/westend.ts on lines 2522..2583
packages/types-known/src/upgrades/e2e/westend.ts on lines 2584..2645
packages/types-known/src/upgrades/e2e/westend.ts on lines 2646..2707
packages/types-known/src/upgrades/e2e/westend.ts on lines 2708..2769
packages/types-known/src/upgrades/e2e/westend.ts on lines 2770..2831
packages/types-known/src/upgrades/e2e/westend.ts on lines 2832..2893
packages/types-known/src/upgrades/e2e/westend.ts on lines 2894..2955
packages/types-known/src/upgrades/e2e/westend.ts on lines 2956..3017
packages/types-known/src/upgrades/e2e/westend.ts on lines 3018..3079
packages/types-known/src/upgrades/e2e/westend.ts on lines 3080..3141
packages/types-known/src/upgrades/e2e/westend.ts on lines 3142..3203
packages/types-known/src/upgrades/e2e/westend.ts on lines 3204..3265
packages/types-known/src/upgrades/e2e/westend.ts on lines 3266..3327

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

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

  [
    5661442,
    9050,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/polkadot.ts and 68 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2332..2393
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2394..2455
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2456..2517
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2518..2579
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2580..2641
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2642..2703
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2704..2765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2766..2827
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2828..2889
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2890..2951
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2952..3013
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3014..3075
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3076..3137
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3138..3199
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3200..3261
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3262..3323
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3324..3385
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3386..3447
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3448..3509
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3510..3571
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3572..3633
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3634..3695
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1368..1429
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1430..1491
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1492..1553
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1554..1615
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1616..1677
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1678..1739
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1740..1801
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1802..1863
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1864..1925
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1926..1987
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1988..2049
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2050..2111
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2112..2173
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2174..2235
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2236..2297
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2298..2359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1468..1529
packages/types-known/src/upgrades/e2e/westend.ts on lines 1530..1591
packages/types-known/src/upgrades/e2e/westend.ts on lines 1592..1653
packages/types-known/src/upgrades/e2e/westend.ts on lines 1654..1715
packages/types-known/src/upgrades/e2e/westend.ts on lines 1716..1777
packages/types-known/src/upgrades/e2e/westend.ts on lines 1778..1839
packages/types-known/src/upgrades/e2e/westend.ts on lines 1840..1901
packages/types-known/src/upgrades/e2e/westend.ts on lines 1902..1963
packages/types-known/src/upgrades/e2e/westend.ts on lines 1964..2025
packages/types-known/src/upgrades/e2e/westend.ts on lines 2026..2087
packages/types-known/src/upgrades/e2e/westend.ts on lines 2088..2149
packages/types-known/src/upgrades/e2e/westend.ts on lines 2150..2211
packages/types-known/src/upgrades/e2e/westend.ts on lines 2212..2273
packages/types-known/src/upgrades/e2e/westend.ts on lines 2274..2335
packages/types-known/src/upgrades/e2e/westend.ts on lines 2336..2397
packages/types-known/src/upgrades/e2e/westend.ts on lines 2398..2459
packages/types-known/src/upgrades/e2e/westend.ts on lines 2460..2521
packages/types-known/src/upgrades/e2e/westend.ts on lines 2522..2583
packages/types-known/src/upgrades/e2e/westend.ts on lines 2584..2645
packages/types-known/src/upgrades/e2e/westend.ts on lines 2646..2707
packages/types-known/src/upgrades/e2e/westend.ts on lines 2708..2769
packages/types-known/src/upgrades/e2e/westend.ts on lines 2770..2831
packages/types-known/src/upgrades/e2e/westend.ts on lines 2832..2893
packages/types-known/src/upgrades/e2e/westend.ts on lines 2894..2955
packages/types-known/src/upgrades/e2e/westend.ts on lines 2956..3017
packages/types-known/src/upgrades/e2e/westend.ts on lines 3018..3079
packages/types-known/src/upgrades/e2e/westend.ts on lines 3080..3141
packages/types-known/src/upgrades/e2e/westend.ts on lines 3142..3203
packages/types-known/src/upgrades/e2e/westend.ts on lines 3204..3265
packages/types-known/src/upgrades/e2e/westend.ts on lines 3266..3327

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

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

  [
    7560558,
    9122,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/polkadot.ts and 68 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2332..2393
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2394..2455
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2456..2517
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2518..2579
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2580..2641
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2642..2703
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2704..2765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2766..2827
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2828..2889
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2890..2951
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2952..3013
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3014..3075
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3076..3137
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3138..3199
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3200..3261
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3262..3323
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3324..3385
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3386..3447
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3448..3509
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3510..3571
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3572..3633
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3634..3695
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1306..1367
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1368..1429
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1430..1491
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1492..1553
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1554..1615
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1678..1739
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1740..1801
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1802..1863
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1864..1925
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1926..1987
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1988..2049
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2050..2111
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2112..2173
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2174..2235
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2236..2297
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2298..2359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1468..1529
packages/types-known/src/upgrades/e2e/westend.ts on lines 1530..1591
packages/types-known/src/upgrades/e2e/westend.ts on lines 1592..1653
packages/types-known/src/upgrades/e2e/westend.ts on lines 1654..1715
packages/types-known/src/upgrades/e2e/westend.ts on lines 1716..1777
packages/types-known/src/upgrades/e2e/westend.ts on lines 1778..1839
packages/types-known/src/upgrades/e2e/westend.ts on lines 1840..1901
packages/types-known/src/upgrades/e2e/westend.ts on lines 1902..1963
packages/types-known/src/upgrades/e2e/westend.ts on lines 1964..2025
packages/types-known/src/upgrades/e2e/westend.ts on lines 2026..2087
packages/types-known/src/upgrades/e2e/westend.ts on lines 2088..2149
packages/types-known/src/upgrades/e2e/westend.ts on lines 2150..2211
packages/types-known/src/upgrades/e2e/westend.ts on lines 2212..2273
packages/types-known/src/upgrades/e2e/westend.ts on lines 2274..2335
packages/types-known/src/upgrades/e2e/westend.ts on lines 2336..2397
packages/types-known/src/upgrades/e2e/westend.ts on lines 2398..2459
packages/types-known/src/upgrades/e2e/westend.ts on lines 2460..2521
packages/types-known/src/upgrades/e2e/westend.ts on lines 2522..2583
packages/types-known/src/upgrades/e2e/westend.ts on lines 2584..2645
packages/types-known/src/upgrades/e2e/westend.ts on lines 2646..2707
packages/types-known/src/upgrades/e2e/westend.ts on lines 2708..2769
packages/types-known/src/upgrades/e2e/westend.ts on lines 2770..2831
packages/types-known/src/upgrades/e2e/westend.ts on lines 2832..2893
packages/types-known/src/upgrades/e2e/westend.ts on lines 2894..2955
packages/types-known/src/upgrades/e2e/westend.ts on lines 2956..3017
packages/types-known/src/upgrades/e2e/westend.ts on lines 3018..3079
packages/types-known/src/upgrades/e2e/westend.ts on lines 3080..3141
packages/types-known/src/upgrades/e2e/westend.ts on lines 3142..3203
packages/types-known/src/upgrades/e2e/westend.ts on lines 3204..3265
packages/types-known/src/upgrades/e2e/westend.ts on lines 3266..3327

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

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

  [
    8638103,
    9151,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/polkadot.ts and 68 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2332..2393
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2394..2455
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2456..2517
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2518..2579
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2580..2641
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2642..2703
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2704..2765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2766..2827
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2828..2889
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2890..2951
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2952..3013
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3014..3075
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3076..3137
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3138..3199
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3200..3261
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3262..3323
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3324..3385
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3386..3447
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3448..3509
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3510..3571
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3572..3633
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3634..3695
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1306..1367
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1368..1429
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1430..1491
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1492..1553
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1554..1615
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1616..1677
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1678..1739
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1802..1863
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1864..1925
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1926..1987
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1988..2049
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2050..2111
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2112..2173
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2174..2235
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2236..2297
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2298..2359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1468..1529
packages/types-known/src/upgrades/e2e/westend.ts on lines 1530..1591
packages/types-known/src/upgrades/e2e/westend.ts on lines 1592..1653
packages/types-known/src/upgrades/e2e/westend.ts on lines 1654..1715
packages/types-known/src/upgrades/e2e/westend.ts on lines 1716..1777
packages/types-known/src/upgrades/e2e/westend.ts on lines 1778..1839
packages/types-known/src/upgrades/e2e/westend.ts on lines 1840..1901
packages/types-known/src/upgrades/e2e/westend.ts on lines 1902..1963
packages/types-known/src/upgrades/e2e/westend.ts on lines 1964..2025
packages/types-known/src/upgrades/e2e/westend.ts on lines 2026..2087
packages/types-known/src/upgrades/e2e/westend.ts on lines 2088..2149
packages/types-known/src/upgrades/e2e/westend.ts on lines 2150..2211
packages/types-known/src/upgrades/e2e/westend.ts on lines 2212..2273
packages/types-known/src/upgrades/e2e/westend.ts on lines 2274..2335
packages/types-known/src/upgrades/e2e/westend.ts on lines 2336..2397
packages/types-known/src/upgrades/e2e/westend.ts on lines 2398..2459
packages/types-known/src/upgrades/e2e/westend.ts on lines 2460..2521
packages/types-known/src/upgrades/e2e/westend.ts on lines 2522..2583
packages/types-known/src/upgrades/e2e/westend.ts on lines 2584..2645
packages/types-known/src/upgrades/e2e/westend.ts on lines 2646..2707
packages/types-known/src/upgrades/e2e/westend.ts on lines 2708..2769
packages/types-known/src/upgrades/e2e/westend.ts on lines 2770..2831
packages/types-known/src/upgrades/e2e/westend.ts on lines 2832..2893
packages/types-known/src/upgrades/e2e/westend.ts on lines 2894..2955
packages/types-known/src/upgrades/e2e/westend.ts on lines 2956..3017
packages/types-known/src/upgrades/e2e/westend.ts on lines 3018..3079
packages/types-known/src/upgrades/e2e/westend.ts on lines 3080..3141
packages/types-known/src/upgrades/e2e/westend.ts on lines 3142..3203
packages/types-known/src/upgrades/e2e/westend.ts on lines 3204..3265
packages/types-known/src/upgrades/e2e/westend.ts on lines 3266..3327

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

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

export interface AssetMetadata extends Struct {
  readonly deposit: TAssetDepositBalance;
  readonly name: Bytes;
  readonly symbol: Bytes;
  readonly decimals: u8;
Severity: Major
Found in packages/types/src/interfaces/assets/types.ts and 18 other locations - About 1 hr to fix
packages/types/src/interfaces/babe/types.ts on lines 137..143
packages/types/src/interfaces/bridges/types.ts on lines 120..126
packages/types/src/interfaces/contracts/types.ts on lines 73..79
packages/types/src/interfaces/contracts/types.ts on lines 132..138
packages/types/src/interfaces/contracts/types.ts on lines 150..156
packages/types/src/interfaces/contracts/types.ts on lines 173..179
packages/types/src/interfaces/contracts/types.ts on lines 462..468
packages/types/src/interfaces/contracts/types.ts on lines 510..516
packages/types/src/interfaces/democracy/types.ts on lines 111..117
packages/types/src/interfaces/democracy/types.ts on lines 136..142
packages/types/src/interfaces/grandpa/types.ts on lines 132..138
packages/types/src/interfaces/grandpa/types.ts on lines 172..178
packages/types/src/interfaces/imOnline/types.ts on lines 16..22
packages/types/src/interfaces/purchase/types.ts on lines 8..14
packages/types/src/interfaces/system/types.ts on lines 39..45
packages/types/src/interfaces/system/types.ts on lines 360..366
packages/types/src/interfaces/xcm/types.ts on lines 1409..1415
packages/types/src/interfaces/xcm/types.ts on lines 1542..1548

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

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

export interface ContractInstantiateResultU64 extends Struct {
  readonly gasConsumed: u64;
  readonly gasRequired: u64;
  readonly storageDeposit: StorageDeposit;
  readonly debugMessage: Text;
Severity: Major
Found in packages/types/src/interfaces/contracts/types.ts and 18 other locations - About 1 hr to fix
packages/types/src/interfaces/assets/types.ts on lines 50..56
packages/types/src/interfaces/babe/types.ts on lines 137..143
packages/types/src/interfaces/bridges/types.ts on lines 120..126
packages/types/src/interfaces/contracts/types.ts on lines 73..79
packages/types/src/interfaces/contracts/types.ts on lines 132..138
packages/types/src/interfaces/contracts/types.ts on lines 150..156
packages/types/src/interfaces/contracts/types.ts on lines 462..468
packages/types/src/interfaces/contracts/types.ts on lines 510..516
packages/types/src/interfaces/democracy/types.ts on lines 111..117
packages/types/src/interfaces/democracy/types.ts on lines 136..142
packages/types/src/interfaces/grandpa/types.ts on lines 132..138
packages/types/src/interfaces/grandpa/types.ts on lines 172..178
packages/types/src/interfaces/imOnline/types.ts on lines 16..22
packages/types/src/interfaces/purchase/types.ts on lines 8..14
packages/types/src/interfaces/system/types.ts on lines 39..45
packages/types/src/interfaces/system/types.ts on lines 360..366
packages/types/src/interfaces/xcm/types.ts on lines 1409..1415
packages/types/src/interfaces/xcm/types.ts on lines 1542..1548

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

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

export interface OutboundPayload extends Struct {
  readonly specVersion: u32;
  readonly weight: Weight;
  readonly origin: CallOrigin;
  readonly dispatchFeePayment: DispatchFeePayment;
Severity: Major
Found in packages/types/src/interfaces/bridges/types.ts and 18 other locations - About 1 hr to fix
packages/types/src/interfaces/assets/types.ts on lines 50..56
packages/types/src/interfaces/babe/types.ts on lines 137..143
packages/types/src/interfaces/contracts/types.ts on lines 73..79
packages/types/src/interfaces/contracts/types.ts on lines 132..138
packages/types/src/interfaces/contracts/types.ts on lines 150..156
packages/types/src/interfaces/contracts/types.ts on lines 173..179
packages/types/src/interfaces/contracts/types.ts on lines 462..468
packages/types/src/interfaces/contracts/types.ts on lines 510..516
packages/types/src/interfaces/democracy/types.ts on lines 111..117
packages/types/src/interfaces/democracy/types.ts on lines 136..142
packages/types/src/interfaces/grandpa/types.ts on lines 132..138
packages/types/src/interfaces/grandpa/types.ts on lines 172..178
packages/types/src/interfaces/imOnline/types.ts on lines 16..22
packages/types/src/interfaces/purchase/types.ts on lines 8..14
packages/types/src/interfaces/system/types.ts on lines 39..45
packages/types/src/interfaces/system/types.ts on lines 360..366
packages/types/src/interfaces/xcm/types.ts on lines 1409..1415
packages/types/src/interfaces/xcm/types.ts on lines 1542..1548

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

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

  [
    13555777,
    9250,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/kusama.ts and 68 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2332..2393
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2394..2455
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2456..2517
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2518..2579
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2580..2641
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2642..2703
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2704..2765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2766..2827
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2828..2889
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2890..2951
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2952..3013
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3014..3075
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3076..3137
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3138..3199
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3200..3261
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3262..3323
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3324..3385
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3386..3447
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3448..3509
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3510..3571
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3634..3695
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1306..1367
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1368..1429
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1430..1491
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1492..1553
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1554..1615
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1616..1677
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1678..1739
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1740..1801
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1802..1863
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1864..1925
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1926..1987
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1988..2049
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2050..2111
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2112..2173
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2174..2235
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2236..2297
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2298..2359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1468..1529
packages/types-known/src/upgrades/e2e/westend.ts on lines 1530..1591
packages/types-known/src/upgrades/e2e/westend.ts on lines 1592..1653
packages/types-known/src/upgrades/e2e/westend.ts on lines 1654..1715
packages/types-known/src/upgrades/e2e/westend.ts on lines 1716..1777
packages/types-known/src/upgrades/e2e/westend.ts on lines 1778..1839
packages/types-known/src/upgrades/e2e/westend.ts on lines 1840..1901
packages/types-known/src/upgrades/e2e/westend.ts on lines 1902..1963
packages/types-known/src/upgrades/e2e/westend.ts on lines 1964..2025
packages/types-known/src/upgrades/e2e/westend.ts on lines 2026..2087
packages/types-known/src/upgrades/e2e/westend.ts on lines 2088..2149
packages/types-known/src/upgrades/e2e/westend.ts on lines 2150..2211
packages/types-known/src/upgrades/e2e/westend.ts on lines 2212..2273
packages/types-known/src/upgrades/e2e/westend.ts on lines 2274..2335
packages/types-known/src/upgrades/e2e/westend.ts on lines 2336..2397
packages/types-known/src/upgrades/e2e/westend.ts on lines 2398..2459
packages/types-known/src/upgrades/e2e/westend.ts on lines 2460..2521
packages/types-known/src/upgrades/e2e/westend.ts on lines 2522..2583
packages/types-known/src/upgrades/e2e/westend.ts on lines 2584..2645
packages/types-known/src/upgrades/e2e/westend.ts on lines 2646..2707
packages/types-known/src/upgrades/e2e/westend.ts on lines 2708..2769
packages/types-known/src/upgrades/e2e/westend.ts on lines 2770..2831
packages/types-known/src/upgrades/e2e/westend.ts on lines 2832..2893
packages/types-known/src/upgrades/e2e/westend.ts on lines 2894..2955
packages/types-known/src/upgrades/e2e/westend.ts on lines 2956..3017
packages/types-known/src/upgrades/e2e/westend.ts on lines 3018..3079
packages/types-known/src/upgrades/e2e/westend.ts on lines 3080..3141
packages/types-known/src/upgrades/e2e/westend.ts on lines 3142..3203
packages/types-known/src/upgrades/e2e/westend.ts on lines 3204..3265
packages/types-known/src/upgrades/e2e/westend.ts on lines 3266..3327

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

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

  [
    5482450,
    9000,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 68 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2332..2393
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2394..2455
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2456..2517
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2518..2579
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2580..2641
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2642..2703
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2704..2765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2766..2827
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2828..2889
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2890..2951
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2952..3013
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3014..3075
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3076..3137
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3138..3199
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3200..3261
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3262..3323
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3324..3385
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3386..3447
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3448..3509
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3510..3571
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3572..3633
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3634..3695
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1306..1367
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1368..1429
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1430..1491
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1492..1553
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1554..1615
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1616..1677
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1678..1739
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1740..1801
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1802..1863
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1864..1925
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1926..1987
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1988..2049
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2050..2111
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2112..2173
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2174..2235
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2236..2297
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2298..2359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1530..1591
packages/types-known/src/upgrades/e2e/westend.ts on lines 1592..1653
packages/types-known/src/upgrades/e2e/westend.ts on lines 1654..1715
packages/types-known/src/upgrades/e2e/westend.ts on lines 1716..1777
packages/types-known/src/upgrades/e2e/westend.ts on lines 1778..1839
packages/types-known/src/upgrades/e2e/westend.ts on lines 1840..1901
packages/types-known/src/upgrades/e2e/westend.ts on lines 1902..1963
packages/types-known/src/upgrades/e2e/westend.ts on lines 1964..2025
packages/types-known/src/upgrades/e2e/westend.ts on lines 2026..2087
packages/types-known/src/upgrades/e2e/westend.ts on lines 2088..2149
packages/types-known/src/upgrades/e2e/westend.ts on lines 2150..2211
packages/types-known/src/upgrades/e2e/westend.ts on lines 2212..2273
packages/types-known/src/upgrades/e2e/westend.ts on lines 2274..2335
packages/types-known/src/upgrades/e2e/westend.ts on lines 2336..2397
packages/types-known/src/upgrades/e2e/westend.ts on lines 2398..2459
packages/types-known/src/upgrades/e2e/westend.ts on lines 2460..2521
packages/types-known/src/upgrades/e2e/westend.ts on lines 2522..2583
packages/types-known/src/upgrades/e2e/westend.ts on lines 2584..2645
packages/types-known/src/upgrades/e2e/westend.ts on lines 2646..2707
packages/types-known/src/upgrades/e2e/westend.ts on lines 2708..2769
packages/types-known/src/upgrades/e2e/westend.ts on lines 2770..2831
packages/types-known/src/upgrades/e2e/westend.ts on lines 2832..2893
packages/types-known/src/upgrades/e2e/westend.ts on lines 2894..2955
packages/types-known/src/upgrades/e2e/westend.ts on lines 2956..3017
packages/types-known/src/upgrades/e2e/westend.ts on lines 3018..3079
packages/types-known/src/upgrades/e2e/westend.ts on lines 3080..3141
packages/types-known/src/upgrades/e2e/westend.ts on lines 3142..3203
packages/types-known/src/upgrades/e2e/westend.ts on lines 3204..3265
packages/types-known/src/upgrades/e2e/westend.ts on lines 3266..3327

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

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

  [
    6379314,
    9080,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 68 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2332..2393
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2394..2455
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2456..2517
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2518..2579
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2580..2641
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2642..2703
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2704..2765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2766..2827
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2828..2889
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2890..2951
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2952..3013
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3014..3075
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3076..3137
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3138..3199
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3200..3261
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3262..3323
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3324..3385
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3386..3447
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3448..3509
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3510..3571
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3572..3633
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3634..3695
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1306..1367
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1368..1429
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1430..1491
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1492..1553
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1554..1615
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1616..1677
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1678..1739
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1740..1801
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1802..1863
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1864..1925
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1926..1987
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1988..2049
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2050..2111
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2112..2173
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2174..2235
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2236..2297
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2298..2359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1468..1529
packages/types-known/src/upgrades/e2e/westend.ts on lines 1530..1591
packages/types-known/src/upgrades/e2e/westend.ts on lines 1592..1653
packages/types-known/src/upgrades/e2e/westend.ts on lines 1654..1715
packages/types-known/src/upgrades/e2e/westend.ts on lines 1716..1777
packages/types-known/src/upgrades/e2e/westend.ts on lines 1778..1839
packages/types-known/src/upgrades/e2e/westend.ts on lines 1840..1901
packages/types-known/src/upgrades/e2e/westend.ts on lines 1902..1963
packages/types-known/src/upgrades/e2e/westend.ts on lines 2026..2087
packages/types-known/src/upgrades/e2e/westend.ts on lines 2088..2149
packages/types-known/src/upgrades/e2e/westend.ts on lines 2150..2211
packages/types-known/src/upgrades/e2e/westend.ts on lines 2212..2273
packages/types-known/src/upgrades/e2e/westend.ts on lines 2274..2335
packages/types-known/src/upgrades/e2e/westend.ts on lines 2336..2397
packages/types-known/src/upgrades/e2e/westend.ts on lines 2398..2459
packages/types-known/src/upgrades/e2e/westend.ts on lines 2460..2521
packages/types-known/src/upgrades/e2e/westend.ts on lines 2522..2583
packages/types-known/src/upgrades/e2e/westend.ts on lines 2584..2645
packages/types-known/src/upgrades/e2e/westend.ts on lines 2646..2707
packages/types-known/src/upgrades/e2e/westend.ts on lines 2708..2769
packages/types-known/src/upgrades/e2e/westend.ts on lines 2770..2831
packages/types-known/src/upgrades/e2e/westend.ts on lines 2832..2893
packages/types-known/src/upgrades/e2e/westend.ts on lines 2894..2955
packages/types-known/src/upgrades/e2e/westend.ts on lines 2956..3017
packages/types-known/src/upgrades/e2e/westend.ts on lines 3018..3079
packages/types-known/src/upgrades/e2e/westend.ts on lines 3080..3141
packages/types-known/src/upgrades/e2e/westend.ts on lines 3142..3203
packages/types-known/src/upgrades/e2e/westend.ts on lines 3204..3265
packages/types-known/src/upgrades/e2e/westend.ts on lines 3266..3327

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

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

  [
    9921066,
    9170,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 68 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2332..2393
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2394..2455
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2456..2517
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2518..2579
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2580..2641
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2642..2703
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2704..2765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2766..2827
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2828..2889
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2890..2951
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2952..3013
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3014..3075
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3076..3137
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3138..3199
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3200..3261
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3262..3323
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3324..3385
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3386..3447
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3448..3509
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3510..3571
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3572..3633
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3634..3695
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1306..1367
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1368..1429
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1430..1491
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1492..1553
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1554..1615
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1616..1677
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1678..1739
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1740..1801
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1802..1863
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1864..1925
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1926..1987
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1988..2049
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2050..2111
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2112..2173
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2174..2235
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2236..2297
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2298..2359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1468..1529
packages/types-known/src/upgrades/e2e/westend.ts on lines 1530..1591
packages/types-known/src/upgrades/e2e/westend.ts on lines 1592..1653
packages/types-known/src/upgrades/e2e/westend.ts on lines 1654..1715
packages/types-known/src/upgrades/e2e/westend.ts on lines 1716..1777
packages/types-known/src/upgrades/e2e/westend.ts on lines 1778..1839
packages/types-known/src/upgrades/e2e/westend.ts on lines 1840..1901
packages/types-known/src/upgrades/e2e/westend.ts on lines 1902..1963
packages/types-known/src/upgrades/e2e/westend.ts on lines 1964..2025
packages/types-known/src/upgrades/e2e/westend.ts on lines 2026..2087
packages/types-known/src/upgrades/e2e/westend.ts on lines 2088..2149
packages/types-known/src/upgrades/e2e/westend.ts on lines 2150..2211
packages/types-known/src/upgrades/e2e/westend.ts on lines 2212..2273
packages/types-known/src/upgrades/e2e/westend.ts on lines 2274..2335
packages/types-known/src/upgrades/e2e/westend.ts on lines 2336..2397
packages/types-known/src/upgrades/e2e/westend.ts on lines 2398..2459
packages/types-known/src/upgrades/e2e/westend.ts on lines 2460..2521
packages/types-known/src/upgrades/e2e/westend.ts on lines 2522..2583
packages/types-known/src/upgrades/e2e/westend.ts on lines 2584..2645
packages/types-known/src/upgrades/e2e/westend.ts on lines 2708..2769
packages/types-known/src/upgrades/e2e/westend.ts on lines 2770..2831
packages/types-known/src/upgrades/e2e/westend.ts on lines 2832..2893
packages/types-known/src/upgrades/e2e/westend.ts on lines 2894..2955
packages/types-known/src/upgrades/e2e/westend.ts on lines 2956..3017
packages/types-known/src/upgrades/e2e/westend.ts on lines 3018..3079
packages/types-known/src/upgrades/e2e/westend.ts on lines 3080..3141
packages/types-known/src/upgrades/e2e/westend.ts on lines 3142..3203
packages/types-known/src/upgrades/e2e/westend.ts on lines 3204..3265
packages/types-known/src/upgrades/e2e/westend.ts on lines 3266..3327

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

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

  [
    10578091,
    9200,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 68 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2332..2393
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2394..2455
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2456..2517
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2518..2579
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2580..2641
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2642..2703
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2704..2765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2766..2827
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2828..2889
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2890..2951
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2952..3013
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3014..3075
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3076..3137
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3138..3199
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3200..3261
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3262..3323
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3324..3385
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3386..3447
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3448..3509
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3510..3571
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3572..3633
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3634..3695
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1306..1367
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1368..1429
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1430..1491
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1492..1553
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1554..1615
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1616..1677
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1678..1739
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1740..1801
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1802..1863
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1864..1925
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1926..1987
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1988..2049
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2050..2111
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2112..2173
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2174..2235
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2236..2297
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2298..2359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1468..1529
packages/types-known/src/upgrades/e2e/westend.ts on lines 1530..1591
packages/types-known/src/upgrades/e2e/westend.ts on lines 1592..1653
packages/types-known/src/upgrades/e2e/westend.ts on lines 1654..1715
packages/types-known/src/upgrades/e2e/westend.ts on lines 1716..1777
packages/types-known/src/upgrades/e2e/westend.ts on lines 1778..1839
packages/types-known/src/upgrades/e2e/westend.ts on lines 1840..1901
packages/types-known/src/upgrades/e2e/westend.ts on lines 1902..1963
packages/types-known/src/upgrades/e2e/westend.ts on lines 1964..2025
packages/types-known/src/upgrades/e2e/westend.ts on lines 2026..2087
packages/types-known/src/upgrades/e2e/westend.ts on lines 2088..2149
packages/types-known/src/upgrades/e2e/westend.ts on lines 2150..2211
packages/types-known/src/upgrades/e2e/westend.ts on lines 2212..2273
packages/types-known/src/upgrades/e2e/westend.ts on lines 2274..2335
packages/types-known/src/upgrades/e2e/westend.ts on lines 2336..2397
packages/types-known/src/upgrades/e2e/westend.ts on lines 2398..2459
packages/types-known/src/upgrades/e2e/westend.ts on lines 2460..2521
packages/types-known/src/upgrades/e2e/westend.ts on lines 2522..2583
packages/types-known/src/upgrades/e2e/westend.ts on lines 2584..2645
packages/types-known/src/upgrades/e2e/westend.ts on lines 2646..2707
packages/types-known/src/upgrades/e2e/westend.ts on lines 2708..2769
packages/types-known/src/upgrades/e2e/westend.ts on lines 2770..2831
packages/types-known/src/upgrades/e2e/westend.ts on lines 2894..2955
packages/types-known/src/upgrades/e2e/westend.ts on lines 2956..3017
packages/types-known/src/upgrades/e2e/westend.ts on lines 3018..3079
packages/types-known/src/upgrades/e2e/westend.ts on lines 3080..3141
packages/types-known/src/upgrades/e2e/westend.ts on lines 3142..3203
packages/types-known/src/upgrades/e2e/westend.ts on lines 3204..3265
packages/types-known/src/upgrades/e2e/westend.ts on lines 3266..3327

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

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

  [
    9091774,
    9150,
    [
      [
Severity: Major
Found in packages/types-known/src/upgrades/e2e/westend.ts and 68 other locations - About 1 hr to fix
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2332..2393
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2394..2455
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2456..2517
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2518..2579
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2580..2641
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2642..2703
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2704..2765
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2766..2827
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2828..2889
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2890..2951
packages/types-known/src/upgrades/e2e/kusama.ts on lines 2952..3013
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3014..3075
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3076..3137
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3138..3199
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3200..3261
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3262..3323
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3324..3385
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3386..3447
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3448..3509
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3510..3571
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3572..3633
packages/types-known/src/upgrades/e2e/kusama.ts on lines 3634..3695
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1306..1367
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1368..1429
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1430..1491
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1492..1553
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1554..1615
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1616..1677
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1678..1739
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1740..1801
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1802..1863
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1864..1925
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1926..1987
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 1988..2049
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2050..2111
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2112..2173
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2174..2235
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2236..2297
packages/types-known/src/upgrades/e2e/polkadot.ts on lines 2298..2359
packages/types-known/src/upgrades/e2e/westend.ts on lines 1468..1529
packages/types-known/src/upgrades/e2e/westend.ts on lines 1530..1591
packages/types-known/src/upgrades/e2e/westend.ts on lines 1592..1653
packages/types-known/src/upgrades/e2e/westend.ts on lines 1654..1715
packages/types-known/src/upgrades/e2e/westend.ts on lines 1716..1777
packages/types-known/src/upgrades/e2e/westend.ts on lines 1778..1839
packages/types-known/src/upgrades/e2e/westend.ts on lines 1840..1901
packages/types-known/src/upgrades/e2e/westend.ts on lines 1902..1963
packages/types-known/src/upgrades/e2e/westend.ts on lines 1964..2025
packages/types-known/src/upgrades/e2e/westend.ts on lines 2026..2087
packages/types-known/src/upgrades/e2e/westend.ts on lines 2088..2149
packages/types-known/src/upgrades/e2e/westend.ts on lines 2150..2211
packages/types-known/src/upgrades/e2e/westend.ts on lines 2212..2273
packages/types-known/src/upgrades/e2e/westend.ts on lines 2274..2335
packages/types-known/src/upgrades/e2e/westend.ts on lines 2336..2397
packages/types-known/src/upgrades/e2e/westend.ts on lines 2398..2459
packages/types-known/src/upgrades/e2e/westend.ts on lines 2460..2521
packages/types-known/src/upgrades/e2e/westend.ts on lines 2584..2645
packages/types-known/src/upgrades/e2e/westend.ts on lines 2646..2707
packages/types-known/src/upgrades/e2e/westend.ts on lines 2708..2769
packages/types-known/src/upgrades/e2e/westend.ts on lines 2770..2831
packages/types-known/src/upgrades/e2e/westend.ts on lines 2832..2893
packages/types-known/src/upgrades/e2e/westend.ts on lines 2894..2955
packages/types-known/src/upgrades/e2e/westend.ts on lines 2956..3017
packages/types-known/src/upgrades/e2e/westend.ts on lines 3018..3079
packages/types-known/src/upgrades/e2e/westend.ts on lines 3080..3141
packages/types-known/src/upgrades/e2e/westend.ts on lines 3142..3203
packages/types-known/src/upgrades/e2e/westend.ts on lines 3204..3265
packages/types-known/src/upgrades/e2e/westend.ts on lines 3266..3327

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

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