TrailerVote/trailervote-media-types

View on GitHub

Showing 36 of 38 total issues

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

export interface ProductBaseV1 extends ProductBaseCreationV1 {
  updated_at: string
  lock_version: number

  _links: {
Severity: Major
Found in typescript/application/vnd.trailervote.product.ts and 1 other location - About 3 hrs to fix
typescript/application/vnd.trailervote.product.ts on lines 44..55

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

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

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

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

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

Refactorings

Further Reading

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

export interface ProductBaseV2 extends ProductBaseCreationV2 {
  updated_at: string
  lock_version: number

  _links: {
Severity: Major
Found in typescript/application/vnd.trailervote.product.ts and 1 other location - About 3 hrs to fix
typescript/application/vnd.trailervote.product.ts on lines 98..109

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

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

    filter: {
      platform?: string | null,
      region?: string | null,
      language?: string | null,
      timezone?: string | null,
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 12..22
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 54..64
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 78..88
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 106..116
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 167..177
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 193..203
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 225..235

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

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

    filter: {
      platform?: string | null,
      region?: string | null,
      language?: string | null,
      timezone?: string | null,
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 12..22
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 54..64
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 78..88
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 106..116
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 146..156
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 167..177
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 193..203

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

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

  filter: {
    platform: string | null,
    region: string | null,
    language: string | null,
    timezone: string | null,
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 12..22
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 54..64
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 78..88
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 106..116
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 146..156
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 193..203
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 225..235

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

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

    filter: {
      platform: string | null,
      region: string | null,
      language: string | null,
      timezone: string | null,
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 12..22
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 54..64
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 106..116
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 146..156
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 167..177
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 193..203
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 225..235

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

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

  filter: {
    platform: string | null,
    region: string | null,
    language: string | null,
    timezone: string | null,
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 12..22
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 54..64
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 78..88
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 146..156
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 167..177
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 193..203
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 225..235

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

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

  filter: {
    platform: string | null,
    region: string | null,
    language: string | null,
    timezone: string | null,
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 12..22
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 54..64
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 78..88
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 106..116
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 146..156
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 167..177
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 225..235

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

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

  filter: {
    platform: string | null,
    region: string | null,
    language: string | null,
    timezone: string | null,
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 54..64
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 78..88
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 106..116
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 146..156
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 167..177
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 193..203
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 225..235

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

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

    filter: {
      platform?: string | null,
      region?: string | null,
      language?: string | null,
      timezone?: string | null,
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 12..22
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 78..88
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 106..116
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 146..156
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 167..177
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 193..203
typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 225..235

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

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

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

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

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

Refactorings

Further Reading

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

export interface PlaceBaseV1 {
  name: string
  parent_place: string | null
  expires_at: string | null
  updated_at: string
Severity: Major
Found in typescript/application/vnd.trailervote.place.ts and 1 other location - About 3 hrs to fix
typescript/application/vnd.trailervote.place.ts on lines 56..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 99.

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

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

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

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

Refactorings

Further Reading

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

export interface PlaceBaseV2 {
  name: string
  parent_place: string | null
  expires_at: string | null
  updated_at: string
Severity: Major
Found in typescript/application/vnd.trailervote.place.ts and 1 other location - About 3 hrs to fix
typescript/application/vnd.trailervote.place.ts on lines 89..100

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

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

interface MovieDataV2 extends GenericDataV2 {
  type: 'movie'
  mpaa_rating?: null | 'G' | 'PG' | 'PG-13' | 'R' | 'NC-17' | 'NR'
  run_time?: null | number
  release_date?: null | string
Severity: Major
Found in typescript/application/vnd.trailervote.product.ts and 1 other location - About 2 hrs to fix
typescript/application/vnd.trailervote.product.ts on lines 80..86

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

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

interface MovieDataV1 extends GenericDataV1 {
  type: 'movie'
  mpaa_rating?: null | 'G' | 'PG' | 'PG-13' | 'R' | 'NC-17' | 'NR'
  run_time?: null | number
  release_date?: null | string
Severity: Major
Found in typescript/application/vnd.trailervote.product.ts and 1 other location - About 2 hrs to fix
typescript/application/vnd.trailervote.product.ts on lines 20..26

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

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

File vnd.trailervote.push_trivial_campaign.ts has 252 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {VoteValue} from './types/vote_value'

export interface PushTrivialCampaignV5 {
  push_campaign_trivial: PushTrivialCampaignBaseV5
}
Severity: Minor
Found in typescript/application/vnd.trailervote.push_trivial_campaign.ts - About 2 hrs to fix

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

        _links: {
          product_asset?: {
            href: string
          },
          product?: {
    typescript/application/vnd.trailervote.carousel.ts on lines 19..24
    typescript/application/vnd.trailervote.interactive_player.ts on lines 5..10
    typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 132..145

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

    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

        _links: {
          product_asset?: {
            href: string
          },
          product?: {
    typescript/application/vnd.trailervote.carousel.ts on lines 19..24
    typescript/application/vnd.trailervote.interactive_player.ts on lines 5..10
    typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 40..53

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

    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

        _links: {
          self: { href: string }
          advert: { href: string }
          direct: { href: string }
          product: { href: string }
    typescript/application/vnd.trailervote.carousel.ts on lines 19..24
    typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 40..53
    typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 132..145

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

    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

      _links: {
        product: { href: string }
        video: { href: string }
        direct: { href: string }
        interactive_player: { href: string }
    Severity: Major
    Found in typescript/application/vnd.trailervote.carousel.ts and 3 other locations - About 1 hr to fix
    typescript/application/vnd.trailervote.interactive_player.ts on lines 5..10
    typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 40..53
    typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 132..145

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

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

      _links: {
        audio_fragment: { href: string }
        product: { href: string }
        persona: { href: string }
      }
    Severity: Major
    Found in typescript/application/vnd.trailervote.feedback.ts and 4 other locations - About 55 mins to fix
    typescript/application/vnd.trailervote.persona.ts on lines 4..8
    typescript/application/vnd.trailervote.push_manifest.ts on lines 10..14
    typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 23..27
    typescript/application/vnd.trailervote.push_trivial_campaign.ts on lines 117..121

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

    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