nukeop/nuclear

View on GitHub

Showing 661 of 661 total issues

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

  it('search an album songs by albumid', async () => {
    mockFetch('test');
    mockFetch([{ test: 'test data' }]);
    const json = await (await rest.iTunes.albumSongsSearch('1440806041', '1')).json();
    expect(fetch).toHaveBeenCalledTimes(1);
Severity: Major
Found in packages/core/src/rest/itunes.test.ts and 7 other locations - About 3 hrs to fix
packages/core/src/rest/itunes.test.ts on lines 19..25
packages/core/src/rest/itunes.test.ts on lines 27..33
packages/core/src/rest/itunes.test.ts on lines 43..49
packages/core/src/rest/itunes.test.ts on lines 57..63
packages/core/src/rest/itunes.test.ts on lines 65..71
packages/core/src/rest/itunes.test.ts on lines 73..79
packages/core/src/rest/itunes.test.ts on lines 81..87

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

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

  it('search for podcasts', async () => {
    mockFetch('test');
    mockFetch([{ test: 'test data' }]);
    const json = await (await rest.iTunes.podcastSearch('Programming Throwdown', '1')).json();
    expect(fetch).toHaveBeenCalledTimes(1);
Severity: Major
Found in packages/core/src/rest/itunes.test.ts and 7 other locations - About 3 hrs to fix
packages/core/src/rest/itunes.test.ts on lines 27..33
packages/core/src/rest/itunes.test.ts on lines 43..49
packages/core/src/rest/itunes.test.ts on lines 57..63
packages/core/src/rest/itunes.test.ts on lines 65..71
packages/core/src/rest/itunes.test.ts on lines 73..79
packages/core/src/rest/itunes.test.ts on lines 81..87
packages/core/src/rest/itunes.test.ts on lines 97..103

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

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 function loadBestNewTracks() {
  return dispatch => {
    dispatch(loadBestNewTracksAction.request());
    getBestNewTracks()
      .then(tracks => {
Severity: Major
Found in packages/app/app/actions/dashboard.ts and 1 other location - About 3 hrs to fix
packages/app/app/actions/dashboard.ts on lines 65..77

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

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

  it('search for episodes', async () => {
    mockFetch('test');
    mockFetch([{ test: 'test data' }]);
    const json = await (await rest.iTunes.episodesSearch('Programming Throwdown', '1')).json();
    expect(fetch).toHaveBeenCalledTimes(1);
Severity: Major
Found in packages/core/src/rest/itunes.test.ts and 7 other locations - About 3 hrs to fix
packages/core/src/rest/itunes.test.ts on lines 19..25
packages/core/src/rest/itunes.test.ts on lines 43..49
packages/core/src/rest/itunes.test.ts on lines 57..63
packages/core/src/rest/itunes.test.ts on lines 65..71
packages/core/src/rest/itunes.test.ts on lines 73..79
packages/core/src/rest/itunes.test.ts on lines 81..87
packages/core/src/rest/itunes.test.ts on lines 97..103

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

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

  it('search for albums', async () => {
    mockFetch('test');
    mockFetch([{ test: 'test data' }]);
    const json = await (await rest.iTunes.albumSearch('Live at Wembley Stadium', '1')).json();
    expect(fetch).toHaveBeenCalledTimes(1);
Severity: Major
Found in packages/core/src/rest/itunes.test.ts and 7 other locations - About 3 hrs to fix
packages/core/src/rest/itunes.test.ts on lines 19..25
packages/core/src/rest/itunes.test.ts on lines 27..33
packages/core/src/rest/itunes.test.ts on lines 43..49
packages/core/src/rest/itunes.test.ts on lines 57..63
packages/core/src/rest/itunes.test.ts on lines 73..79
packages/core/src/rest/itunes.test.ts on lines 81..87
packages/core/src/rest/itunes.test.ts on lines 97..103

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

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

  it('search for artists', async () => {
    mockFetch('test');
    mockFetch([{ test: 'test data' }]);
    const json = await (await rest.iTunes.artistSearch('Queen', '1')).json();
    expect(fetch).toHaveBeenCalledTimes(1);
Severity: Major
Found in packages/core/src/rest/itunes.test.ts and 7 other locations - About 3 hrs to fix
packages/core/src/rest/itunes.test.ts on lines 19..25
packages/core/src/rest/itunes.test.ts on lines 27..33
packages/core/src/rest/itunes.test.ts on lines 43..49
packages/core/src/rest/itunes.test.ts on lines 65..71
packages/core/src/rest/itunes.test.ts on lines 73..79
packages/core/src/rest/itunes.test.ts on lines 81..87
packages/core/src/rest/itunes.test.ts on lines 97..103

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

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

  it('search an artist details by artistid', async () => {
    mockFetch('test');
    mockFetch([{ test: 'test data' }]);
    const json = await (await rest.iTunes.artistDetailsSearch('3296287', '1')).json();
    expect(fetch).toHaveBeenCalledTimes(1);
Severity: Major
Found in packages/core/src/rest/itunes.test.ts and 7 other locations - About 3 hrs to fix
packages/core/src/rest/itunes.test.ts on lines 19..25
packages/core/src/rest/itunes.test.ts on lines 27..33
packages/core/src/rest/itunes.test.ts on lines 43..49
packages/core/src/rest/itunes.test.ts on lines 57..63
packages/core/src/rest/itunes.test.ts on lines 65..71
packages/core/src/rest/itunes.test.ts on lines 73..79
packages/core/src/rest/itunes.test.ts on lines 97..103

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

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

  it('search for a podcast episodes by podcastid', async () => {
    mockFetch('test');
    mockFetch([{ test: 'test data' }]);
    const json = await (await rest.iTunes.getPodcastEpisodes('427166321', '1')).json();
    expect(fetch).toHaveBeenCalledTimes(1);
Severity: Major
Found in packages/core/src/rest/itunes.test.ts and 7 other locations - About 3 hrs to fix
packages/core/src/rest/itunes.test.ts on lines 19..25
packages/core/src/rest/itunes.test.ts on lines 27..33
packages/core/src/rest/itunes.test.ts on lines 57..63
packages/core/src/rest/itunes.test.ts on lines 65..71
packages/core/src/rest/itunes.test.ts on lines 73..79
packages/core/src/rest/itunes.test.ts on lines 81..87
packages/core/src/rest/itunes.test.ts on lines 97..103

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

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 function loadBestNewAlbums() {
  return dispatch => {
    dispatch(loadBestNewAlbumsAction.request());
    getBestNewAlbums()
      .then(albums => {
Severity: Major
Found in packages/app/app/actions/dashboard.ts and 1 other location - About 3 hrs to fix
packages/app/app/actions/dashboard.ts on lines 85..97

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

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

  it('search for music', async () => {
    mockFetch('test');
    mockFetch([{ test: 'test data' }]);
    const json = await (await rest.iTunes.musicSearch('We Will Rock You', '1')).json();
    expect(fetch).toHaveBeenCalledTimes(1);
Severity: Major
Found in packages/core/src/rest/itunes.test.ts and 7 other locations - About 3 hrs to fix
packages/core/src/rest/itunes.test.ts on lines 19..25
packages/core/src/rest/itunes.test.ts on lines 27..33
packages/core/src/rest/itunes.test.ts on lines 43..49
packages/core/src/rest/itunes.test.ts on lines 57..63
packages/core/src/rest/itunes.test.ts on lines 65..71
packages/core/src/rest/itunes.test.ts on lines 81..87
packages/core/src/rest/itunes.test.ts on lines 97..103

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

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

  const strings: TrackPopupStrings = {
    textAddToQueue: t('add-to-queue'),
    textPlayNow: t('play-now'),
    textPlayNext: t('play-next'),
    textAddToFavorites: t('add-to-favorite'),
Severity: Major
Found in packages/app/app/containers/TrackPopupContainer/hooks.ts and 1 other location - About 3 hrs to fix
packages/app/app/containers/TrackTableContainer/index.tsx on lines 112..126

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

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

  const popupStrings = {
    textAddToQueue: popupTranstation('add-to-queue'),
    textPlayNow: popupTranstation('play-now'),
    textPlayNext: popupTranstation('play-next'),
    textAddToFavorites: popupTranstation('add-to-favorite'),
Severity: Major
Found in packages/app/app/containers/TrackTableContainer/index.tsx and 1 other location - About 3 hrs to fix
packages/app/app/containers/TrackPopupContainer/hooks.ts on lines 112..126

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

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 PlayerBarContainer.test.tsx has 318 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import { fireEvent, render, waitFor } from '@testing-library/react';

import { AnyProps, configureMockStore, setupI18Next, TestStoreProvider } from '../../../test/testUtils';
import { getMouseEvent } from '../../../test/mockMouseEvent';

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

      it('should search for tags after clicking his tag', async () => {
        const { component, history } = mountComponent();
        expect(history.location.pathname).toBe('/artist/test-artist-id');
        await waitFor(() => component.getByText(/#tag1/i).click());
        expect(history.location.pathname).toBe('/tag/tag1');
    packages/app/app/containers/AlbumViewContainer/AlbumViewContainer.test.tsx on lines 34..39
    packages/app/app/containers/ArtistViewContainer/ArtistViewContainer.test.tsx on lines 44..49
    packages/app/app/containers/PlaylistsContainer/PlaylistsContainer.test.tsx on lines 75..80

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

    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

      it('should search for similar artist after clicking his name', async () => {
        const { component, history } = mountComponent();
        expect(history.location.pathname).toBe('/artist/test-artist-id');
        await waitFor(() => component.getByText(/artist-similar-1/i).click());
        expect(history.location.pathname).toBe('/artist/artist-similar-id');
    packages/app/app/containers/AlbumViewContainer/AlbumViewContainer.test.tsx on lines 34..39
    packages/app/app/containers/ArtistViewContainer/ArtistViewContainer.test.tsx on lines 37..42
    packages/app/app/containers/PlaylistsContainer/PlaylistsContainer.test.tsx on lines 75..80

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

    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

      it('prefers a closer match in case of a partial match', () => {
        const tracks = [
          ytTrack({
            title: 'Johnny Cash - The Mercy Seat'
          }),
    Severity: Major
    Found in packages/core/src/rest/heuristics.test.ts and 1 other location - About 3 hrs to fix
    packages/core/src/rest/heuristics.test.ts on lines 110..128

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

    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

      it('prefers an official video', () => {
        const tracks = [
          ytTrack({
            title: 'Ozzy Osbourne - Crazy Train (crappy bootleg)'
          }),
    Severity: Major
    Found in packages/core/src/rest/heuristics.test.ts and 1 other location - About 3 hrs to fix
    packages/core/src/rest/heuristics.test.ts on lines 64..81

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

    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

      it('should go to playlist after clicking on it', async () => {
        const { component, history } = mountComponent();
        expect(history.location.pathname).toBe('/playlists');
        await waitFor(() => component.getByText(/test playlist 2/i).click());
        expect(history.location.pathname).toBe('/playlist/test-playlist-id-2');
    packages/app/app/containers/AlbumViewContainer/AlbumViewContainer.test.tsx on lines 34..39
    packages/app/app/containers/ArtistViewContainer/ArtistViewContainer.test.tsx on lines 37..42
    packages/app/app/containers/ArtistViewContainer/ArtistViewContainer.test.tsx on lines 44..49

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

    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

      it('search for a podcast by podcastid', async () => {
        mockFetch('test');
        mockFetch([{ test: 'test data' }]);
        const json = await (await rest.iTunes.getPodcast('427166321')).json();
        expect(fetch).toHaveBeenCalledTimes(1);
    Severity: Major
    Found in packages/core/src/rest/itunes.test.ts and 1 other location - About 3 hrs to fix
    packages/core/src/rest/itunes.test.ts on lines 89..95

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

    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

      it('should search for artist after clicking his name', async () => {
        const { component, history } = mountComponent();
        expect(history.location.pathname).toBe('/album/test-album-id');
        await waitFor(() => component.getByText(/test artist/i).click());
        expect(history.location.pathname).toBe('/artist/test-artist-id');
    packages/app/app/containers/ArtistViewContainer/ArtistViewContainer.test.tsx on lines 37..42
    packages/app/app/containers/ArtistViewContainer/ArtistViewContainer.test.tsx on lines 44..49
    packages/app/app/containers/PlaylistsContainer/PlaylistsContainer.test.tsx on lines 75..80

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

    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