nukeop/nuclear

View on GitHub

Showing 520 of 663 total issues

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

        {withAddToDownloads && (
          <PopupButton
            data-testid='track-popup-download'
            onClick={onAddToDownloads}
            ariaLabel='Download this track'
Severity: Major
Found in packages/ui/lib/components/TrackPopup/index.tsx and 4 other locations - About 35 mins to fix
packages/ui/lib/components/TrackPopup/index.tsx on lines 100..108
packages/ui/lib/components/TrackPopup/index.tsx on lines 110..118
packages/ui/lib/components/TrackPopup/index.tsx on lines 120..128
packages/ui/lib/components/TrackPopup/index.tsx on lines 130..138

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

        PropTypes.shape({
          uuid: PropTypes.string,
          artist: PropTypes.string,
          name: PropTypes.string,
          thumbnail: PropTypes.string
Severity: Minor
Found in packages/app/app/components/PlaylistsSubMenu/index.js and 1 other location - About 35 mins to fix
packages/app/app/components/LibraryView/index.js on lines 146..151

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

    }, {
      id: 'go-to-lyrics',
      name: t('actions.go-to-lyrics'),
      icon: 'microphone',
      category: t('categories.navigation'),
Severity: Major
Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

    }, {
      id: 'go-to-search',
      name: t('actions.go-to-search'),
      icon: 'search',
      category: t('categories.navigation'),
Severity: Major
Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

    }, {
      id: 'go-to-favorite-tracks',
      name: t('actions.go-to-favorite-tracks'),
      icon: 'music',
      category: t('categories.navigation'),
Severity: Major
Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

    }, {
      id: 'go-to-downloads',
      name: t('actions.go-to-downloads'),
      icon: 'download',
      category: t('categories.navigation'),
Severity: Major
Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

    tracks={[{
      artist: 'Test Artist 3',
      title: 'Test Title 3',
      createdAt: new Date(new Date().setDate(new Date().getDate() - 2))
    }]}
Severity: Minor
Found in packages/ui/stories/components/trackTable.stories.tsx and 2 other locations - About 35 mins to fix
packages/ui/stories/components/trackTable.stories.tsx on lines 151..155
packages/ui/stories/components/trackTable.stories.tsx on lines 155..159

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

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

      this.props.actions.addToQueue({
        artist: artist.name,
        name: track.name,
        thumbnail: track.thumbnail || track.image[0]['#text']
      });
Severity: Minor
Found in packages/app/app/containers/SoundContainer/index.js and 1 other location - About 35 mins to fix
packages/app/app/containers/SoundContainer/autoradio.js on lines 198..202

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

    }, {
      id: 'go-to-library',
      name: t('actions.go-to-library'),
      icon: 'file audio outline',
      category: t('categories.navigation'),
Severity: Major
Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
packages/app/app/containers/CommandPaletteContainer/hooks.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 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

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

      const {track} =_.find(payload.downloads, (item) => item.track.uuid === payload.track);
Severity: Minor
Found in packages/app/app/store/middlewares/ipc.ts and 1 other location - About 35 mins to fix
packages/app/app/store/middlewares/ipc.ts on lines 116..116

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

    }, {
      id: 'go-to-dashboard',
      name: t('actions.go-to-dashboard'),
      icon: 'dashboard',
      category: t('categories.navigation'),
Severity: Major
Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

    }, {
      id: 'go-to-plugins',
      name: t('actions.go-to-plugins'),
      icon: 'flask',
      category: t('categories.navigation'),
Severity: Major
Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

  queueActions: PropTypes.shape({
    addToQueue: PropTypes.func,
    clearQueue: PropTypes.func,
    selectSong: PropTypes.func,
    playTrack: PropTypes.func
Severity: Minor
Found in packages/app/app/components/LibraryView/index.js and 1 other location - About 35 mins to fix
packages/app/app/components/PlaylistsSubMenu/index.js on lines 37..42

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

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

    const selectedStreamProvider = _.find(
      state.plugin.plugins.streamProviders,
      { sourceName: state.plugin.selected.streamProviders });
packages/app/app/containers/FavoritesContainer/FavoritesContainer.tracks.test.tsx on lines 204..206

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

    }, {
      id: 'go-to-settings',
      name: t('actions.go-to-settings'),
      icon: 'cog',
      category: t('categories.navigation'),
Severity: Major
Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

    }, {
      id: 'go-to-playlists',
      name: t('actions.go-to-playlists'),
      icon: 'list alternate outline',
      category: t('categories.navigation'),
Severity: Major
Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

    try {
      const { uuid } = data;
      this.downloadItems = this.downloadItems.filter((item => item.uuid === uuid));
    } catch (error) {
      this.window.send(IpcEvents.DOWNLOAD_ERROR, { uuid: data.uuid, error });
Severity: Minor
Found in packages/main/src/controllers/download.ts and 2 other locations - About 35 mins to fix
packages/main/src/controllers/download.ts on lines 51..119
packages/main/src/controllers/download.ts on lines 135..144

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

    tracks={[{
      artist: 'Test Artist 2',
      title: 'Test Title 2',
      createdAt: new Date(new Date().setDate(new Date().getDate() - 1))
    }, {
Severity: Minor
Found in packages/ui/stories/components/trackTable.stories.tsx and 2 other locations - About 35 mins to fix
packages/ui/stories/components/trackTable.stories.tsx on lines 155..159
packages/ui/stories/components/trackTable.stories.tsx on lines 166..170

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

    }, {
      artist: 'Test Artist 4',
      title: 'Test Title 4',
      createdAt: new Date(new Date().setDate(new Date().getDate() - 1))
    }]}
Severity: Minor
Found in packages/ui/stories/components/trackTable.stories.tsx and 2 other locations - About 35 mins to fix
packages/ui/stories/components/trackTable.stories.tsx on lines 151..155
packages/ui/stories/components/trackTable.stories.tsx on lines 166..170

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

        {withAddToQueue && (
          <PopupButton
            data-testid='track-popup-add-queue'
            onClick={onAddToQueue}
            ariaLabel='Add track to queue'
Severity: Major
Found in packages/ui/lib/components/TrackPopup/index.tsx and 4 other locations - About 35 mins to fix
packages/ui/lib/components/TrackPopup/index.tsx on lines 110..118
packages/ui/lib/components/TrackPopup/index.tsx on lines 120..128
packages/ui/lib/components/TrackPopup/index.tsx on lines 130..138
packages/ui/lib/components/TrackPopup/index.tsx on lines 165..173

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