Showing 52 of 71 total issues

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

  getMentions(params?: MentionRequest): Promise<PnutResponse<Post[]>> {
    return this.get('/users/me/mentions', params)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 6 other locations - About 35 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 175..179
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 201..205
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 214..216
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 239..241
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 356..358
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 360..362

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

  getUnifiedStream(params?: HomeStreamRequest): Promise<PnutResponse<Post[]>> {
    return this.get('/posts/streams/unified', params)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 6 other locations - About 35 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 175..179
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 201..205
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 239..241
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 331..333
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 356..358
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 360..362

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

  getGlobal(params?: GeneralPostParameters): Promise<PnutResponse<Post[]>> {
    return this.get('/posts/streams/global', params)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 6 other locations - About 35 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 175..179
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 201..205
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 214..216
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 239..241
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 331..333
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 360..362

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

  searchUsers(params: SearchUsersRequest): Promise<PnutResponse<User[]>> {
    return this.get('/users/search', params)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 6 other locations - About 35 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 175..179
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 201..205
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 214..216
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 331..333
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 356..358
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 360..362

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

  getInteractions(
    params?: GetInteractionParameters
  ): Promise<PnutResponse<InteractionType[]>> {
    return this.get('/users/me/interactions', params)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 6 other locations - About 35 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 175..179
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 214..216
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 239..241
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 331..333
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 356..358
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 360..362

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

  searchChannels(
    params?: SearchChannelRequest
  ): Promise<PnutResponse<Channel[]>> {
    return this.get('/channels/search', params)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 6 other locations - About 35 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 201..205
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 214..216
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 239..241
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 331..333
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 356..358
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 360..362

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

  getHomeStream(params?: HomeStreamRequest): Promise<PnutResponse<Post[]>> {
    return this.get('/posts/streams/me', params)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 6 other locations - About 35 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 175..179
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 201..205
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 214..216
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 239..241
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 331..333
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 356..358

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

function oembedIsAudio(oembed: OEmbedType): oembed is OEmbed.Audio {
  return oembed.value.type === 'audio'
}
Severity: Minor
Found in src/assets/ts/util.ts and 1 other location - About 35 mins to fix
src/assets/ts/util.ts on lines 82..84

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

function rawIsOembedVideo(oembed: OEmbedType): oembed is OEmbed.Video {
  return oembed.value.type === 'video'
}
Severity: Minor
Found in src/assets/ts/util.ts and 1 other location - About 35 mins to fix
src/assets/ts/util.ts on lines 65..67

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

  export function rawIsChannelInvite(raw: Raw): raw is ChannelInvite {
    return raw.type === ChannelInvite.type
  }
Severity: Minor
Found in src/entity/raw/raw/channel-invite.ts and 2 other locations - About 30 mins to fix
src/entity/raw/raw/crosspost.ts on lines 9..11
src/entity/raw/raw/long-post.ts on lines 21..23

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

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

  export function rawIsLongPost(raw: Raw): raw is LongPost {
    return raw.type === LongPost.type
  }
Severity: Minor
Found in src/entity/raw/raw/long-post.ts and 2 other locations - About 30 mins to fix
src/entity/raw/raw/channel-invite.ts on lines 11..13
src/entity/raw/raw/crosspost.ts on lines 9..11

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

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

  export function rawIsCrosspost(raw: Raw): raw is Crosspost {
    return raw.type === Crosspost.type
  }
Severity: Minor
Found in src/entity/raw/raw/crosspost.ts and 2 other locations - About 30 mins to fix
src/entity/raw/raw/channel-invite.ts on lines 11..13
src/entity/raw/raw/long-post.ts on lines 21..23

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

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