polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

    readonly asTeamChanged: {
      readonly collection: u32;
      readonly issuer: Option<AccountId32>;
      readonly admin: Option<AccountId32>;
      readonly freezer: Option<AccountId32>;
Severity: Major
Found in packages/types-augment/src/lookup/types-substrate.ts and 1 other location - About 1 hr to fix
packages/types-augment/src/lookup/types-substrate.ts on lines 4572..4577

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

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

  [TypeDefInfo.Result]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
    return dualParamsNotation(registry, 'Result', typeDef, definitions, imports, withShortcut);
  },
Severity: Major
Found in packages/typegen/src/util/formatting.ts and 11 other locations - About 1 hr to fix
packages/typegen/src/util/formatting.ts on lines 137..139
packages/typegen/src/util/formatting.ts on lines 169..171
packages/typegen/src/util/formatting.ts on lines 179..181
packages/typegen/src/util/formatting.ts on lines 183..185
packages/typegen/src/util/formatting.ts on lines 225..227
packages/typegen/src/util/formatting.ts on lines 241..243
packages/typegen/src/util/formatting.ts on lines 245..247
packages/typegen/src/util/formatting.ts on lines 249..251
packages/typegen/src/util/formatting.ts on lines 253..255
packages/typegen/src/util/formatting.ts on lines 261..263
packages/typegen/src/util/formatting.ts on lines 265..267

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

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

  [TypeDefInfo.Option]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
    return singleParamNotation(registry, 'Option', typeDef, definitions, imports, withShortcut);
  },
Severity: Major
Found in packages/typegen/src/util/formatting.ts and 11 other locations - About 1 hr to fix
packages/typegen/src/util/formatting.ts on lines 137..139
packages/typegen/src/util/formatting.ts on lines 179..181
packages/typegen/src/util/formatting.ts on lines 183..185
packages/typegen/src/util/formatting.ts on lines 225..227
packages/typegen/src/util/formatting.ts on lines 241..243
packages/typegen/src/util/formatting.ts on lines 245..247
packages/typegen/src/util/formatting.ts on lines 249..251
packages/typegen/src/util/formatting.ts on lines 253..255
packages/typegen/src/util/formatting.ts on lines 257..259
packages/typegen/src/util/formatting.ts on lines 261..263
packages/typegen/src/util/formatting.ts on lines 265..267

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

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

  [TypeDefInfo.HashMap]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
    return dualParamsNotation(registry, 'HashMap', typeDef, definitions, imports, withShortcut);
  },
Severity: Major
Found in packages/typegen/src/util/formatting.ts and 11 other locations - About 1 hr to fix
packages/typegen/src/util/formatting.ts on lines 137..139
packages/typegen/src/util/formatting.ts on lines 169..171
packages/typegen/src/util/formatting.ts on lines 179..181
packages/typegen/src/util/formatting.ts on lines 183..185
packages/typegen/src/util/formatting.ts on lines 225..227
packages/typegen/src/util/formatting.ts on lines 241..243
packages/typegen/src/util/formatting.ts on lines 245..247
packages/typegen/src/util/formatting.ts on lines 253..255
packages/typegen/src/util/formatting.ts on lines 257..259
packages/typegen/src/util/formatting.ts on lines 261..263
packages/typegen/src/util/formatting.ts on lines 265..267

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

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

  [TypeDefInfo.Range]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
    return singleParamNotation(registry, 'Range', typeDef, definitions, imports, withShortcut);
  },
Severity: Major
Found in packages/typegen/src/util/formatting.ts and 11 other locations - About 1 hr to fix
packages/typegen/src/util/formatting.ts on lines 137..139
packages/typegen/src/util/formatting.ts on lines 169..171
packages/typegen/src/util/formatting.ts on lines 183..185
packages/typegen/src/util/formatting.ts on lines 225..227
packages/typegen/src/util/formatting.ts on lines 241..243
packages/typegen/src/util/formatting.ts on lines 245..247
packages/typegen/src/util/formatting.ts on lines 249..251
packages/typegen/src/util/formatting.ts on lines 253..255
packages/typegen/src/util/formatting.ts on lines 257..259
packages/typegen/src/util/formatting.ts on lines 261..263
packages/typegen/src/util/formatting.ts on lines 265..267

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

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

  [TypeDefInfo.BTreeMap]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
    return dualParamsNotation(registry, 'BTreeMap', typeDef, definitions, imports, withShortcut);
  },
Severity: Major
Found in packages/typegen/src/util/formatting.ts and 11 other locations - About 1 hr to fix
packages/typegen/src/util/formatting.ts on lines 137..139
packages/typegen/src/util/formatting.ts on lines 169..171
packages/typegen/src/util/formatting.ts on lines 179..181
packages/typegen/src/util/formatting.ts on lines 183..185
packages/typegen/src/util/formatting.ts on lines 225..227
packages/typegen/src/util/formatting.ts on lines 245..247
packages/typegen/src/util/formatting.ts on lines 249..251
packages/typegen/src/util/formatting.ts on lines 253..255
packages/typegen/src/util/formatting.ts on lines 257..259
packages/typegen/src/util/formatting.ts on lines 261..263
packages/typegen/src/util/formatting.ts on lines 265..267

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

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

  [TypeDefInfo.BTreeSet]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
    return singleParamNotation(registry, 'BTreeSet', typeDef, definitions, imports, withShortcut);
  },
Severity: Major
Found in packages/typegen/src/util/formatting.ts and 11 other locations - About 1 hr to fix
packages/typegen/src/util/formatting.ts on lines 137..139
packages/typegen/src/util/formatting.ts on lines 169..171
packages/typegen/src/util/formatting.ts on lines 179..181
packages/typegen/src/util/formatting.ts on lines 183..185
packages/typegen/src/util/formatting.ts on lines 225..227
packages/typegen/src/util/formatting.ts on lines 241..243
packages/typegen/src/util/formatting.ts on lines 249..251
packages/typegen/src/util/formatting.ts on lines 253..255
packages/typegen/src/util/formatting.ts on lines 257..259
packages/typegen/src/util/formatting.ts on lines 261..263
packages/typegen/src/util/formatting.ts on lines 265..267

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

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

  [TypeDefInfo.WrapperKeepOpaque]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
    return singleParamNotation(registry, 'WrapperKeepOpaque', typeDef, definitions, imports, withShortcut);
  },
Severity: Major
Found in packages/typegen/src/util/formatting.ts and 11 other locations - About 1 hr to fix
packages/typegen/src/util/formatting.ts on lines 137..139
packages/typegen/src/util/formatting.ts on lines 169..171
packages/typegen/src/util/formatting.ts on lines 179..181
packages/typegen/src/util/formatting.ts on lines 183..185
packages/typegen/src/util/formatting.ts on lines 225..227
packages/typegen/src/util/formatting.ts on lines 241..243
packages/typegen/src/util/formatting.ts on lines 245..247
packages/typegen/src/util/formatting.ts on lines 249..251
packages/typegen/src/util/formatting.ts on lines 253..255
packages/typegen/src/util/formatting.ts on lines 257..259
packages/typegen/src/util/formatting.ts on lines 265..267

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

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

  [TypeDefInfo.Compact]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
    return singleParamNotation(registry, 'Compact', typeDef, definitions, imports, withShortcut);
  },
Severity: Major
Found in packages/typegen/src/util/formatting.ts and 11 other locations - About 1 hr to fix
packages/typegen/src/util/formatting.ts on lines 169..171
packages/typegen/src/util/formatting.ts on lines 179..181
packages/typegen/src/util/formatting.ts on lines 183..185
packages/typegen/src/util/formatting.ts on lines 225..227
packages/typegen/src/util/formatting.ts on lines 241..243
packages/typegen/src/util/formatting.ts on lines 245..247
packages/typegen/src/util/formatting.ts on lines 249..251
packages/typegen/src/util/formatting.ts on lines 253..255
packages/typegen/src/util/formatting.ts on lines 257..259
packages/typegen/src/util/formatting.ts on lines 261..263
packages/typegen/src/util/formatting.ts on lines 265..267

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

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

  [TypeDefInfo.RangeInclusive]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
    return singleParamNotation(registry, 'RangeInclusive', typeDef, definitions, imports, withShortcut);
  },
Severity: Major
Found in packages/typegen/src/util/formatting.ts and 11 other locations - About 1 hr to fix
packages/typegen/src/util/formatting.ts on lines 137..139
packages/typegen/src/util/formatting.ts on lines 169..171
packages/typegen/src/util/formatting.ts on lines 179..181
packages/typegen/src/util/formatting.ts on lines 225..227
packages/typegen/src/util/formatting.ts on lines 241..243
packages/typegen/src/util/formatting.ts on lines 245..247
packages/typegen/src/util/formatting.ts on lines 249..251
packages/typegen/src/util/formatting.ts on lines 253..255
packages/typegen/src/util/formatting.ts on lines 257..259
packages/typegen/src/util/formatting.ts on lines 261..263
packages/typegen/src/util/formatting.ts on lines 265..267

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

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

  [TypeDefInfo.Vec]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
    return singleParamNotation(registry, 'Vec', typeDef, definitions, imports, withShortcut);
  },
Severity: Major
Found in packages/typegen/src/util/formatting.ts and 11 other locations - About 1 hr to fix
packages/typegen/src/util/formatting.ts on lines 137..139
packages/typegen/src/util/formatting.ts on lines 169..171
packages/typegen/src/util/formatting.ts on lines 179..181
packages/typegen/src/util/formatting.ts on lines 183..185
packages/typegen/src/util/formatting.ts on lines 241..243
packages/typegen/src/util/formatting.ts on lines 245..247
packages/typegen/src/util/formatting.ts on lines 249..251
packages/typegen/src/util/formatting.ts on lines 253..255
packages/typegen/src/util/formatting.ts on lines 257..259
packages/typegen/src/util/formatting.ts on lines 261..263
packages/typegen/src/util/formatting.ts on lines 265..267

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

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

  [TypeDefInfo.WrapperOpaque]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
    return singleParamNotation(registry, 'WrapperOpaque', typeDef, definitions, imports, withShortcut);
  }
Severity: Major
Found in packages/typegen/src/util/formatting.ts and 11 other locations - About 1 hr to fix
packages/typegen/src/util/formatting.ts on lines 137..139
packages/typegen/src/util/formatting.ts on lines 169..171
packages/typegen/src/util/formatting.ts on lines 179..181
packages/typegen/src/util/formatting.ts on lines 183..185
packages/typegen/src/util/formatting.ts on lines 225..227
packages/typegen/src/util/formatting.ts on lines 241..243
packages/typegen/src/util/formatting.ts on lines 245..247
packages/typegen/src/util/formatting.ts on lines 249..251
packages/typegen/src/util/formatting.ts on lines 253..255
packages/typegen/src/util/formatting.ts on lines 257..259
packages/typegen/src/util/formatting.ts on lines 261..263

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

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

  [TypeDefInfo.Linkage]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
    return singleParamNotation(registry, 'Linkage', typeDef, definitions, imports, withShortcut);
  },
Severity: Major
Found in packages/typegen/src/util/formatting.ts and 11 other locations - About 1 hr to fix
packages/typegen/src/util/formatting.ts on lines 137..139
packages/typegen/src/util/formatting.ts on lines 169..171
packages/typegen/src/util/formatting.ts on lines 179..181
packages/typegen/src/util/formatting.ts on lines 183..185
packages/typegen/src/util/formatting.ts on lines 225..227
packages/typegen/src/util/formatting.ts on lines 241..243
packages/typegen/src/util/formatting.ts on lines 245..247
packages/typegen/src/util/formatting.ts on lines 249..251
packages/typegen/src/util/formatting.ts on lines 257..259
packages/typegen/src/util/formatting.ts on lines 261..263
packages/typegen/src/util/formatting.ts on lines 265..267

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

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

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

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

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

Refactorings

Further Reading

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

      forceDefaultXcmVersion: AugmentedSubmittable<(maybeXcmVersion: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
Severity: Major
Found in packages/api-augment/src/polkadot/tx.ts and 7 other locations - About 1 hr to fix
packages/api-augment/src/kusama/tx.ts on lines 748..748
packages/api-augment/src/kusama/tx.ts on lines 752..752
packages/api-augment/src/kusama/tx.ts on lines 4221..4221
packages/api-augment/src/polkadot/tx.ts on lines 342..342
packages/api-augment/src/polkadot/tx.ts on lines 346..346
packages/api-augment/src/substrate/tx.ts on lines 3639..3639
packages/api-augment/src/substrate/tx.ts on lines 7218..7218

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

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

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

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

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

Refactorings

Further Reading

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

      setMaxValidatorsPerCore: AugmentedSubmittable<(updated: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
Severity: Major
Found in packages/api-augment/src/kusama/tx.ts and 7 other locations - About 1 hr to fix
packages/api-augment/src/kusama/tx.ts on lines 748..748
packages/api-augment/src/kusama/tx.ts on lines 4221..4221
packages/api-augment/src/polkadot/tx.ts on lines 342..342
packages/api-augment/src/polkadot/tx.ts on lines 346..346
packages/api-augment/src/polkadot/tx.ts on lines 1548..1548
packages/api-augment/src/substrate/tx.ts on lines 3639..3639
packages/api-augment/src/substrate/tx.ts on lines 7218..7218

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

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

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

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

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

Refactorings

Further Reading

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

      setAcceptOwnership: AugmentedSubmittable<(maybeCollection: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
Severity: Major
Found in packages/api-augment/src/substrate/tx.ts and 7 other locations - About 1 hr to fix
packages/api-augment/src/kusama/tx.ts on lines 748..748
packages/api-augment/src/kusama/tx.ts on lines 752..752
packages/api-augment/src/kusama/tx.ts on lines 4221..4221
packages/api-augment/src/polkadot/tx.ts on lines 342..342
packages/api-augment/src/polkadot/tx.ts on lines 346..346
packages/api-augment/src/polkadot/tx.ts on lines 1548..1548
packages/api-augment/src/substrate/tx.ts on lines 7218..7218

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

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

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

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

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

Refactorings

Further Reading

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

      setMaxValidators: AugmentedSubmittable<(updated: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
Severity: Major
Found in packages/api-augment/src/kusama/tx.ts and 7 other locations - About 1 hr to fix
packages/api-augment/src/kusama/tx.ts on lines 752..752
packages/api-augment/src/kusama/tx.ts on lines 4221..4221
packages/api-augment/src/polkadot/tx.ts on lines 342..342
packages/api-augment/src/polkadot/tx.ts on lines 346..346
packages/api-augment/src/polkadot/tx.ts on lines 1548..1548
packages/api-augment/src/substrate/tx.ts on lines 3639..3639
packages/api-augment/src/substrate/tx.ts on lines 7218..7218

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

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

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

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

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

Refactorings

Further Reading

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

      setMaxValidatorsPerCore: AugmentedSubmittable<(updated: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
Severity: Major
Found in packages/api-augment/src/polkadot/tx.ts and 7 other locations - About 1 hr to fix
packages/api-augment/src/kusama/tx.ts on lines 748..748
packages/api-augment/src/kusama/tx.ts on lines 752..752
packages/api-augment/src/kusama/tx.ts on lines 4221..4221
packages/api-augment/src/polkadot/tx.ts on lines 342..342
packages/api-augment/src/polkadot/tx.ts on lines 1548..1548
packages/api-augment/src/substrate/tx.ts on lines 3639..3639
packages/api-augment/src/substrate/tx.ts on lines 7218..7218

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

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

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

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

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

Refactorings

Further Reading

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

      forceDefaultXcmVersion: AugmentedSubmittable<(maybeXcmVersion: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
Severity: Major
Found in packages/api-augment/src/kusama/tx.ts and 7 other locations - About 1 hr to fix
packages/api-augment/src/kusama/tx.ts on lines 748..748
packages/api-augment/src/kusama/tx.ts on lines 752..752
packages/api-augment/src/polkadot/tx.ts on lines 342..342
packages/api-augment/src/polkadot/tx.ts on lines 346..346
packages/api-augment/src/polkadot/tx.ts on lines 1548..1548
packages/api-augment/src/substrate/tx.ts on lines 3639..3639
packages/api-augment/src/substrate/tx.ts on lines 7218..7218

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

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

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

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

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

Refactorings

Further Reading

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

      setAcceptOwnership: AugmentedSubmittable<(maybeCollection: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
Severity: Major
Found in packages/api-augment/src/substrate/tx.ts and 7 other locations - About 1 hr to fix
packages/api-augment/src/kusama/tx.ts on lines 748..748
packages/api-augment/src/kusama/tx.ts on lines 752..752
packages/api-augment/src/kusama/tx.ts on lines 4221..4221
packages/api-augment/src/polkadot/tx.ts on lines 342..342
packages/api-augment/src/polkadot/tx.ts on lines 346..346
packages/api-augment/src/polkadot/tx.ts on lines 1548..1548
packages/api-augment/src/substrate/tx.ts on lines 3639..3639

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

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