olehmell/subsocial-sdk

View on GitHub

Showing 372 of 393 total issues

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

      reservedWords: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<bool>, [Bytes]>;
Severity: Minor
Found in packages/definitions/src/interfaces/augment-api-query.ts and 1 other location - About 35 mins to fix
packages/definitions/src/interfaces/augment-api-query.ts on lines 169..169

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

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

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

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

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

Refactorings

Further Reading

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

        searchScript.addEventListener("load", () => {
            searchEl.classList.remove("loading");
            searchEl.classList.add("ready");
        });
Severity: Minor
Found in themes/docs-theme/assets/js/src/typedoc/components/Search.ts and 1 other location - About 35 mins to fix
themes/docs-theme/assets/js/src/typedoc/components/Search.ts on lines 40..43

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

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

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

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

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

Refactorings

Further Reading

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

        searchScript.addEventListener("error", () => {
            searchEl.classList.remove("loading");
            searchEl.classList.add("failure");
        });
Severity: Minor
Found in themes/docs-theme/assets/js/src/typedoc/components/Search.ts and 1 other location - About 35 mins to fix
themes/docs-theme/assets/js/src/typedoc/components/Search.ts on lines 44..47

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

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

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

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

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

Refactorings

Further Reading

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

  async repliesCountByPostId (postId: AnyPostId) {
    return this.getStorageLength({
      pallet: 'posts',
      storage: 'replyIdsByPostId',
      itemBytesSize: U64_BYTES_SIZE
Severity: Major
Found in packages/api/src/substrate/index.ts and 3 other locations - About 35 mins to fix
packages/api/src/substrate/index.ts on lines 132..138
packages/api/src/substrate/index.ts on lines 149..155
packages/api/src/substrate/index.ts on lines 183..189

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

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

    sudo: {
      /**
       * The `AccountId` of the sudo key.
       **/
      key: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []>;
Severity: Minor
Found in packages/definitions/src/interfaces/augment-api-query.ts and 2 other locations - About 35 mins to fix
packages/definitions/src/interfaces/augment-api-query.ts on lines 37..46
packages/definitions/src/interfaces/augment-api-query.ts on lines 358..365

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

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

    auraExt: {
      /**
       * Serves as cache for the authorities.
       * 
       * The authorities in AuRa are overwritten in `on_initialize` when we switch to a new session,
Severity: Minor
Found in packages/definitions/src/interfaces/augment-api-query.ts and 2 other locations - About 35 mins to fix
packages/definitions/src/interfaces/augment-api-query.ts on lines 358..365
packages/definitions/src/interfaces/augment-api-query.ts on lines 456..461

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

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

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

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

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

Refactorings

Further Reading

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

  async postsCountBySpaceId (spaceId: AnySpaceId) {
    return this.getStorageLength({
      pallet: 'posts',
      storage: 'postIdsBySpaceId',
      itemBytesSize: U64_BYTES_SIZE
Severity: Major
Found in packages/api/src/substrate/index.ts and 3 other locations - About 35 mins to fix
packages/api/src/substrate/index.ts on lines 149..155
packages/api/src/substrate/index.ts on lines 166..172
packages/api/src/substrate/index.ts on lines 183..189

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

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

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

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

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

Refactorings

Further Reading

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

      supportedTlds: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<bool>, [Bytes]>;
Severity: Minor
Found in packages/definitions/src/interfaces/augment-api-query.ts and 1 other location - About 35 mins to fix
packages/definitions/src/interfaces/augment-api-query.ts on lines 168..168

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

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

      setProfile: AugmentedSubmittable<(spaceId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
Severity: Major
Found in packages/definitions/src/interfaces/augment-api-tx.ts and 8 other locations - About 35 mins to fix
packages/definitions/src/interfaces/augment-api-tx.ts on lines 361..361
packages/definitions/src/interfaces/augment-api-tx.ts on lines 362..362
packages/definitions/src/interfaces/augment-api-tx.ts on lines 570..570
packages/definitions/src/interfaces/augment-api-tx.ts on lines 646..646
packages/definitions/src/interfaces/augment-api-tx.ts on lines 648..648
packages/definitions/src/interfaces/augment-api-tx.ts on lines 651..651
packages/definitions/src/interfaces/augment-api-tx.ts on lines 652..652
packages/definitions/src/interfaces/augment-api-tx.ts on lines 658..658

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

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

      forceSetNextPostId: AugmentedSubmittable<(postId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
Severity: Major
Found in packages/definitions/src/interfaces/augment-api-tx.ts and 8 other locations - About 35 mins to fix
packages/definitions/src/interfaces/augment-api-tx.ts on lines 361..361
packages/definitions/src/interfaces/augment-api-tx.ts on lines 369..369
packages/definitions/src/interfaces/augment-api-tx.ts on lines 570..570
packages/definitions/src/interfaces/augment-api-tx.ts on lines 646..646
packages/definitions/src/interfaces/augment-api-tx.ts on lines 648..648
packages/definitions/src/interfaces/augment-api-tx.ts on lines 651..651
packages/definitions/src/interfaces/augment-api-tx.ts on lines 652..652
packages/definitions/src/interfaces/augment-api-tx.ts on lines 658..658

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

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

      forceSetNextReactionId: AugmentedSubmittable<(reactionId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
Severity: Major
Found in packages/definitions/src/interfaces/augment-api-tx.ts and 8 other locations - About 35 mins to fix
packages/definitions/src/interfaces/augment-api-tx.ts on lines 361..361
packages/definitions/src/interfaces/augment-api-tx.ts on lines 362..362
packages/definitions/src/interfaces/augment-api-tx.ts on lines 369..369
packages/definitions/src/interfaces/augment-api-tx.ts on lines 646..646
packages/definitions/src/interfaces/augment-api-tx.ts on lines 648..648
packages/definitions/src/interfaces/augment-api-tx.ts on lines 651..651
packages/definitions/src/interfaces/augment-api-tx.ts on lines 652..652
packages/definitions/src/interfaces/augment-api-tx.ts on lines 658..658

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

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

      forceRemovePost: AugmentedSubmittable<(postId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
Severity: Major
Found in packages/definitions/src/interfaces/augment-api-tx.ts and 8 other locations - About 35 mins to fix
packages/definitions/src/interfaces/augment-api-tx.ts on lines 362..362
packages/definitions/src/interfaces/augment-api-tx.ts on lines 369..369
packages/definitions/src/interfaces/augment-api-tx.ts on lines 570..570
packages/definitions/src/interfaces/augment-api-tx.ts on lines 646..646
packages/definitions/src/interfaces/augment-api-tx.ts on lines 648..648
packages/definitions/src/interfaces/augment-api-tx.ts on lines 651..651
packages/definitions/src/interfaces/augment-api-tx.ts on lines 652..652
packages/definitions/src/interfaces/augment-api-tx.ts on lines 658..658

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

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

      forceSetNextSpaceId: AugmentedSubmittable<(spaceId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
Severity: Major
Found in packages/definitions/src/interfaces/augment-api-tx.ts and 8 other locations - About 35 mins to fix
packages/definitions/src/interfaces/augment-api-tx.ts on lines 361..361
packages/definitions/src/interfaces/augment-api-tx.ts on lines 362..362
packages/definitions/src/interfaces/augment-api-tx.ts on lines 369..369
packages/definitions/src/interfaces/augment-api-tx.ts on lines 570..570
packages/definitions/src/interfaces/augment-api-tx.ts on lines 646..646
packages/definitions/src/interfaces/augment-api-tx.ts on lines 648..648
packages/definitions/src/interfaces/augment-api-tx.ts on lines 651..651
packages/definitions/src/interfaces/augment-api-tx.ts on lines 652..652

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

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

      rejectPendingOwnership: AugmentedSubmittable<(spaceId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
Severity: Major
Found in packages/definitions/src/interfaces/augment-api-tx.ts and 8 other locations - About 35 mins to fix
packages/definitions/src/interfaces/augment-api-tx.ts on lines 361..361
packages/definitions/src/interfaces/augment-api-tx.ts on lines 362..362
packages/definitions/src/interfaces/augment-api-tx.ts on lines 369..369
packages/definitions/src/interfaces/augment-api-tx.ts on lines 570..570
packages/definitions/src/interfaces/augment-api-tx.ts on lines 646..646
packages/definitions/src/interfaces/augment-api-tx.ts on lines 648..648
packages/definitions/src/interfaces/augment-api-tx.ts on lines 651..651
packages/definitions/src/interfaces/augment-api-tx.ts on lines 658..658

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

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

    readonly asTransferReserveAsset: {
      readonly assets: XcmV1MultiassetMultiAssets;
      readonly dest: XcmV1MultiLocation;
      readonly effects: Vec<XcmV1Order>;
    } & Struct;
Severity: Major
Found in packages/definitions/src/interfaces/types-lookup.ts and 5 other locations - About 35 mins to fix
packages/definitions/src/interfaces/types-lookup.ts on lines 1039..1043
packages/definitions/src/interfaces/types-lookup.ts on lines 1045..1049
packages/definitions/src/interfaces/types-lookup.ts on lines 1491..1495
packages/definitions/src/interfaces/types-lookup.ts on lines 2160..2164
packages/definitions/src/interfaces/types-lookup.ts on lines 2166..2170

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

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

      acceptPendingOwnership: AugmentedSubmittable<(spaceId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
Severity: Major
Found in packages/definitions/src/interfaces/augment-api-tx.ts and 8 other locations - About 35 mins to fix
packages/definitions/src/interfaces/augment-api-tx.ts on lines 361..361
packages/definitions/src/interfaces/augment-api-tx.ts on lines 362..362
packages/definitions/src/interfaces/augment-api-tx.ts on lines 369..369
packages/definitions/src/interfaces/augment-api-tx.ts on lines 570..570
packages/definitions/src/interfaces/augment-api-tx.ts on lines 646..646
packages/definitions/src/interfaces/augment-api-tx.ts on lines 648..648
packages/definitions/src/interfaces/augment-api-tx.ts on lines 652..652
packages/definitions/src/interfaces/augment-api-tx.ts on lines 658..658

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

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

    readonly asRoleRevoked: {
      readonly account: AccountId32;
      readonly roleId: u64;
      readonly users: Vec<SubsocialSupportUser>;
    } & Struct;
Severity: Major
Found in packages/definitions/src/interfaces/types-lookup.ts and 5 other locations - About 35 mins to fix
packages/definitions/src/interfaces/types-lookup.ts on lines 1039..1043
packages/definitions/src/interfaces/types-lookup.ts on lines 1491..1495
packages/definitions/src/interfaces/types-lookup.ts on lines 2097..2101
packages/definitions/src/interfaces/types-lookup.ts on lines 2160..2164
packages/definitions/src/interfaces/types-lookup.ts on lines 2166..2170

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

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

    readonly asForceTransfer: {
      readonly source: MultiAddress;
      readonly dest: MultiAddress;
      readonly value: Compact<u128>;
    } & Struct;
Severity: Major
Found in packages/definitions/src/interfaces/types-lookup.ts and 5 other locations - About 35 mins to fix
packages/definitions/src/interfaces/types-lookup.ts on lines 1039..1043
packages/definitions/src/interfaces/types-lookup.ts on lines 1045..1049
packages/definitions/src/interfaces/types-lookup.ts on lines 2097..2101
packages/definitions/src/interfaces/types-lookup.ts on lines 2160..2164
packages/definitions/src/interfaces/types-lookup.ts on lines 2166..2170

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

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

      unfollowSpace: AugmentedSubmittable<(spaceId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
Severity: Major
Found in packages/definitions/src/interfaces/augment-api-tx.ts and 8 other locations - About 35 mins to fix
packages/definitions/src/interfaces/augment-api-tx.ts on lines 361..361
packages/definitions/src/interfaces/augment-api-tx.ts on lines 362..362
packages/definitions/src/interfaces/augment-api-tx.ts on lines 369..369
packages/definitions/src/interfaces/augment-api-tx.ts on lines 570..570
packages/definitions/src/interfaces/augment-api-tx.ts on lines 646..646
packages/definitions/src/interfaces/augment-api-tx.ts on lines 651..651
packages/definitions/src/interfaces/augment-api-tx.ts on lines 652..652
packages/definitions/src/interfaces/augment-api-tx.ts on lines 658..658

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

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

    readonly asRoleGranted: {
      readonly account: AccountId32;
      readonly roleId: u64;
      readonly users: Vec<SubsocialSupportUser>;
    } & Struct;
Severity: Major
Found in packages/definitions/src/interfaces/types-lookup.ts and 5 other locations - About 35 mins to fix
packages/definitions/src/interfaces/types-lookup.ts on lines 1045..1049
packages/definitions/src/interfaces/types-lookup.ts on lines 1491..1495
packages/definitions/src/interfaces/types-lookup.ts on lines 2097..2101
packages/definitions/src/interfaces/types-lookup.ts on lines 2160..2164
packages/definitions/src/interfaces/types-lookup.ts on lines 2166..2170

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

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