airbnb/caravel

View on GitHub

Showing 3,672 of 6,072 total issues

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

afterEach(() => {
  fetchMock.reset();
  act(() => {
    store.dispatch(api.util.resetApiState());
  });
superset-frontend/src/SqlLab/components/AceEditorWrapper/useAnnotations.test.ts on lines 52..57
superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.test.ts on lines 96..101
superset-frontend/src/components/DatabaseSelector/DatabaseSelector.test.tsx on lines 193..198
superset-frontend/src/hooks/apiResources/databaseFunctions.test.ts on lines 36..41
superset-frontend/src/hooks/apiResources/queries.test.ts on lines 68..73
superset-frontend/src/hooks/apiResources/queryValidations.test.ts on lines 46..51
superset-frontend/src/hooks/apiResources/schemas.test.ts on lines 56..61
superset-frontend/src/hooks/apiResources/sqlLab.test.ts on lines 52..57
superset-frontend/src/hooks/apiResources/tables.test.ts on lines 74..79
superset-frontend/src/pages/SqlLab/SqlLab.test.tsx on lines 58..63

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

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

afterEach(() => {
  fetchMock.reset();
  act(() => {
    store.dispatch(api.util.resetApiState());
  });
superset-frontend/src/SqlLab/components/AceEditorWrapper/useAnnotations.test.ts on lines 52..57
superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.test.ts on lines 96..101
superset-frontend/src/components/DatabaseSelector/DatabaseSelector.test.tsx on lines 193..198
superset-frontend/src/hooks/apiResources/databaseFunctions.test.ts on lines 36..41
superset-frontend/src/hooks/apiResources/queries.test.ts on lines 68..73
superset-frontend/src/hooks/apiResources/schemas.test.ts on lines 56..61
superset-frontend/src/hooks/apiResources/sqlEditorTabs.test.ts on lines 48..53
superset-frontend/src/hooks/apiResources/sqlLab.test.ts on lines 52..57
superset-frontend/src/hooks/apiResources/tables.test.ts on lines 74..79
superset-frontend/src/pages/SqlLab/SqlLab.test.tsx on lines 58..63

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

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

afterEach(() => {
  fetchMock.reset();
  act(() => {
    store.dispatch(api.util.resetApiState());
  });
superset-frontend/src/SqlLab/components/AceEditorWrapper/useAnnotations.test.ts on lines 52..57
superset-frontend/src/components/DatabaseSelector/DatabaseSelector.test.tsx on lines 193..198
superset-frontend/src/hooks/apiResources/databaseFunctions.test.ts on lines 36..41
superset-frontend/src/hooks/apiResources/queries.test.ts on lines 68..73
superset-frontend/src/hooks/apiResources/queryValidations.test.ts on lines 46..51
superset-frontend/src/hooks/apiResources/schemas.test.ts on lines 56..61
superset-frontend/src/hooks/apiResources/sqlEditorTabs.test.ts on lines 48..53
superset-frontend/src/hooks/apiResources/sqlLab.test.ts on lines 52..57
superset-frontend/src/hooks/apiResources/tables.test.ts on lines 74..79
superset-frontend/src/pages/SqlLab/SqlLab.test.tsx on lines 58..63

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

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

afterEach(() => {
  fetchMock.reset();
  act(() => {
    store.dispatch(api.util.resetApiState());
  });
superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.test.ts on lines 96..101
superset-frontend/src/components/DatabaseSelector/DatabaseSelector.test.tsx on lines 193..198
superset-frontend/src/hooks/apiResources/databaseFunctions.test.ts on lines 36..41
superset-frontend/src/hooks/apiResources/queries.test.ts on lines 68..73
superset-frontend/src/hooks/apiResources/queryValidations.test.ts on lines 46..51
superset-frontend/src/hooks/apiResources/schemas.test.ts on lines 56..61
superset-frontend/src/hooks/apiResources/sqlEditorTabs.test.ts on lines 48..53
superset-frontend/src/hooks/apiResources/sqlLab.test.ts on lines 52..57
superset-frontend/src/hooks/apiResources/tables.test.ts on lines 74..79
superset-frontend/src/pages/SqlLab/SqlLab.test.tsx on lines 58..63

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

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

afterEach(() => {
  fetchMock.reset();
  act(() => {
    store.dispatch(api.util.resetApiState());
  });
Severity: Major
Found in superset-frontend/src/pages/SqlLab/SqlLab.test.tsx and 10 other locations - About 1 hr to fix
superset-frontend/src/SqlLab/components/AceEditorWrapper/useAnnotations.test.ts on lines 52..57
superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.test.ts on lines 96..101
superset-frontend/src/components/DatabaseSelector/DatabaseSelector.test.tsx on lines 193..198
superset-frontend/src/hooks/apiResources/databaseFunctions.test.ts on lines 36..41
superset-frontend/src/hooks/apiResources/queries.test.ts on lines 68..73
superset-frontend/src/hooks/apiResources/queryValidations.test.ts on lines 46..51
superset-frontend/src/hooks/apiResources/schemas.test.ts on lines 56..61
superset-frontend/src/hooks/apiResources/sqlEditorTabs.test.ts on lines 48..53
superset-frontend/src/hooks/apiResources/sqlLab.test.ts on lines 52..57
superset-frontend/src/hooks/apiResources/tables.test.ts on lines 74..79

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

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

    await waitFor(
      () =>
        expect(store.getActions()).toContainEqual(
          expect.objectContaining({
            type: REFRESH_QUERIES,
superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx on lines 126..134
superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx on lines 150..158
superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx on lines 212..220

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

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

    await waitFor(
      () =>
        expect(store.getActions()).toContainEqual(
          expect.objectContaining({
            type: CLEAR_INACTIVE_QUERIES,
superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx on lines 126..134
superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx on lines 150..158
superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx on lines 184..192

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

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

test('should render a title when visible', () => {
  render(<Popover title="Popover title" visible />);
  expect(screen.getByText('Popover title')).toBeTruthy();
});
Severity: Major
Found in superset-frontend/src/components/Popover/Popover.test.tsx and 2 other locations - About 1 hr to fix
superset-frontend/src/components/Popover/Popover.test.tsx on lines 36..39
superset-frontend/src/components/Popover/Popover.test.tsx on lines 49..52

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

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

    await waitFor(
      () =>
        expect(store.getActions()).toContainEqual(
          expect.objectContaining({
            type: CLEAR_INACTIVE_QUERIES,
superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx on lines 126..134
superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx on lines 184..192
superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx on lines 212..220

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

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

test('should render some content when visible', () => {
  render(<Popover content="Content sample" visible />);
  expect(screen.getByText('Content sample')).toBeTruthy();
});
Severity: Major
Found in superset-frontend/src/components/Popover/Popover.test.tsx and 2 other locations - About 1 hr to fix
superset-frontend/src/components/Popover/Popover.test.tsx on lines 31..34
superset-frontend/src/components/Popover/Popover.test.tsx on lines 49..52

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

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

    await waitFor(
      () =>
        expect(store.getActions()).toContainEqual(
          expect.objectContaining({
            type: REFRESH_QUERIES,
superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx on lines 150..158
superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx on lines 184..192
superset-frontend/src/SqlLab/components/QueryAutoRefresh/QueryAutoRefresh.test.tsx on lines 212..220

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

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

  await waitFor(() => {
    expect(props.addDangerToast).toBeCalledTimes(0);
    expect(window.location.href).toBe(
      'mailto:?Subject=Superset%20dashboard%20COVID%20Vaccine%20Dashboard%20&Body=Check%20out%20this%20dashboard%3A%20http%3A%2F%2Flocalhost%2Fsuperset%2Fdashboard%2Fp%2F123%2F',
    );
superset-frontend/src/dashboard/components/menu/ShareMenuItems/ShareMenuItems.test.tsx on lines 155..158
superset-frontend/src/dashboard/components/menu/ShareMenuItems/ShareMenuItems.test.tsx on lines 186..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 56.

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

        Header: (
          <Tooltip
            id="allow-run-async-header-tooltip"
            title={t('Asynchronous query execution')}
            placement="top"
Severity: Major
Found in superset-frontend/src/pages/DatabaseList/index.tsx and 2 other locations - About 1 hr to fix
superset-frontend/src/pages/DatabaseList/index.tsx on lines 375..383
superset-frontend/src/pages/DatabaseList/index.tsx on lines 523..531

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

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

test('should render ssh_tunnel password fields when needed for import', () => {
  const { getByTestId } = setup({
    sshTunnelPasswordFields: ['databases/examples.yaml'],
  });
  expect(getByTestId('ssh_tunnel_password')).toBeInTheDocument();
superset-frontend/src/components/ImportModal/ImportModal.test.tsx on lines 129..134
superset-frontend/src/components/ImportModal/ImportModal.test.tsx on lines 136..141

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

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

  await waitFor(() => {
    expect(props.addDangerToast).toBeCalledTimes(0);
    expect(window.location.href).toBe('');
  });
superset-frontend/src/dashboard/components/menu/ShareMenuItems/ShareMenuItems.test.tsx on lines 155..158
superset-frontend/src/dashboard/components/menu/ShareMenuItems/ShareMenuItems.test.tsx on lines 164..169

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

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

test('should render ssh_tunnel private_key fields when needed for import', () => {
  const { getByTestId } = setup({
    sshTunnelPrivateKeyFields: ['databases/examples.yaml'],
  });
  expect(getByTestId('ssh_tunnel_private_key')).toBeInTheDocument();
superset-frontend/src/components/ImportModal/ImportModal.test.tsx on lines 122..127
superset-frontend/src/components/ImportModal/ImportModal.test.tsx on lines 136..141

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

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

test('should render ssh_tunnel private_key_password fields when needed for import', () => {
  const { getByTestId } = setup({
    sshTunnelPrivateKeyPasswordFields: ['databases/examples.yaml'],
  });
  expect(getByTestId('ssh_tunnel_private_key_password')).toBeInTheDocument();
superset-frontend/src/components/ImportModal/ImportModal.test.tsx on lines 122..127
superset-frontend/src/components/ImportModal/ImportModal.test.tsx on lines 129..134

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

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

  await waitFor(() => {
    expect(props.addDangerToast).toBeCalledTimes(0);
    expect(window.location.href).toBe('');
  });
superset-frontend/src/dashboard/components/menu/ShareMenuItems/ShareMenuItems.test.tsx on lines 164..169
superset-frontend/src/dashboard/components/menu/ShareMenuItems/ShareMenuItems.test.tsx on lines 186..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 56.

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

        Header: (
          <Tooltip
            id="allow-dml-header-tooltip"
            title={t('Allow data manipulation language')}
            placement="top"
Severity: Major
Found in superset-frontend/src/pages/DatabaseList/index.tsx and 2 other locations - About 1 hr to fix
superset-frontend/src/pages/DatabaseList/index.tsx on lines 355..363
superset-frontend/src/pages/DatabaseList/index.tsx on lines 523..531

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

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

        Header: (
          <Tooltip
            id="allow-run-async-filter-header-tooltip"
            title={t('Asynchronous query execution')}
            placement="top"
Severity: Major
Found in superset-frontend/src/pages/DatabaseList/index.tsx and 2 other locations - About 1 hr to fix
superset-frontend/src/pages/DatabaseList/index.tsx on lines 355..363
superset-frontend/src/pages/DatabaseList/index.tsx on lines 375..383

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

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