airbnb/caravel

View on GitHub

Showing 3,672 of 6,072 total issues

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

test('should render', () => {
  const { container } = render(<ErrorAlert {...mockedProps} />);
  expect(container).toBeInTheDocument();
});
superset-frontend/src/components/Badge/Badge.test.tsx on lines 27..30
superset-frontend/src/components/Datasource/Field.test.tsx on lines 34..37
superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx on lines 38..41
superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx on lines 42..47
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx on lines 41..44
superset-frontend/src/components/ErrorMessage/IssueCode.test.tsx on lines 28..31
superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx on lines 57..60
superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx on lines 56..59
superset-frontend/src/components/ModalTrigger/ModalTrigger.test.tsx on lines 28..31
superset-frontend/src/components/ProgressBar/ProgressBar.test.tsx on lines 26..29
superset-frontend/src/components/Slider/Slider.test.tsx on lines 29..32
superset-frontend/src/components/TableView/TableView.test.tsx on lines 46..49
superset-frontend/src/components/Tags/Tag.test.tsx on lines 32..35
superset-frontend/src/components/Tags/TagsList.test.tsx on lines 56..59
superset-frontend/src/explore/components/controls/TextControl/TextControl.test.tsx on lines 31..34
superset-frontend/src/features/tags/TagModal.test.tsx on lines 34..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

test('should render', () => {
  const { container } = render(<IssueCode {...mockedProps} />);
  expect(container).toBeInTheDocument();
});
superset-frontend/src/components/Badge/Badge.test.tsx on lines 27..30
superset-frontend/src/components/Datasource/Field.test.tsx on lines 34..37
superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx on lines 38..41
superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx on lines 42..47
superset-frontend/src/components/ErrorMessage/ErrorAlert.test.tsx on lines 56..59
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx on lines 41..44
superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx on lines 57..60
superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx on lines 56..59
superset-frontend/src/components/ModalTrigger/ModalTrigger.test.tsx on lines 28..31
superset-frontend/src/components/ProgressBar/ProgressBar.test.tsx on lines 26..29
superset-frontend/src/components/Slider/Slider.test.tsx on lines 29..32
superset-frontend/src/components/TableView/TableView.test.tsx on lines 46..49
superset-frontend/src/components/Tags/Tag.test.tsx on lines 32..35
superset-frontend/src/components/Tags/TagsList.test.tsx on lines 56..59
superset-frontend/src/explore/components/controls/TextControl/TextControl.test.tsx on lines 31..34
superset-frontend/src/features/tags/TagModal.test.tsx on lines 34..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

test('should render', () => {
  const { container } = render(<ParameterErrorMessage {...mockedProps} />);
  expect(container).toBeInTheDocument();
});
superset-frontend/src/components/Badge/Badge.test.tsx on lines 27..30
superset-frontend/src/components/Datasource/Field.test.tsx on lines 34..37
superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx on lines 38..41
superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx on lines 42..47
superset-frontend/src/components/ErrorMessage/ErrorAlert.test.tsx on lines 56..59
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx on lines 41..44
superset-frontend/src/components/ErrorMessage/IssueCode.test.tsx on lines 28..31
superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx on lines 56..59
superset-frontend/src/components/ModalTrigger/ModalTrigger.test.tsx on lines 28..31
superset-frontend/src/components/ProgressBar/ProgressBar.test.tsx on lines 26..29
superset-frontend/src/components/Slider/Slider.test.tsx on lines 29..32
superset-frontend/src/components/TableView/TableView.test.tsx on lines 46..49
superset-frontend/src/components/Tags/Tag.test.tsx on lines 32..35
superset-frontend/src/components/Tags/TagsList.test.tsx on lines 56..59
superset-frontend/src/explore/components/controls/TextControl/TextControl.test.tsx on lines 31..34
superset-frontend/src/features/tags/TagModal.test.tsx on lines 34..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

test('should render', () => {
  const { container } = render(<ErrorMessageWithStackTrace {...mockedProps} />);
  expect(container).toBeInTheDocument();
});
superset-frontend/src/components/Badge/Badge.test.tsx on lines 27..30
superset-frontend/src/components/Datasource/Field.test.tsx on lines 34..37
superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx on lines 38..41
superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx on lines 42..47
superset-frontend/src/components/ErrorMessage/ErrorAlert.test.tsx on lines 56..59
superset-frontend/src/components/ErrorMessage/IssueCode.test.tsx on lines 28..31
superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx on lines 57..60
superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx on lines 56..59
superset-frontend/src/components/ModalTrigger/ModalTrigger.test.tsx on lines 28..31
superset-frontend/src/components/ProgressBar/ProgressBar.test.tsx on lines 26..29
superset-frontend/src/components/Slider/Slider.test.tsx on lines 29..32
superset-frontend/src/components/TableView/TableView.test.tsx on lines 46..49
superset-frontend/src/components/Tags/Tag.test.tsx on lines 32..35
superset-frontend/src/components/Tags/TagsList.test.tsx on lines 56..59
superset-frontend/src/explore/components/controls/TextControl/TextControl.test.tsx on lines 31..34
superset-frontend/src/features/tags/TagModal.test.tsx on lines 34..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

test('should render', () => {
  const { container } = render(<Field {...defaultProps} />);
  expect(container).toBeInTheDocument();
});
Severity: Major
Found in superset-frontend/src/components/Datasource/Field.test.tsx and 16 other locations - About 55 mins to fix
superset-frontend/src/components/Badge/Badge.test.tsx on lines 27..30
superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx on lines 38..41
superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx on lines 42..47
superset-frontend/src/components/ErrorMessage/ErrorAlert.test.tsx on lines 56..59
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx on lines 41..44
superset-frontend/src/components/ErrorMessage/IssueCode.test.tsx on lines 28..31
superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx on lines 57..60
superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx on lines 56..59
superset-frontend/src/components/ModalTrigger/ModalTrigger.test.tsx on lines 28..31
superset-frontend/src/components/ProgressBar/ProgressBar.test.tsx on lines 26..29
superset-frontend/src/components/Slider/Slider.test.tsx on lines 29..32
superset-frontend/src/components/TableView/TableView.test.tsx on lines 46..49
superset-frontend/src/components/Tags/Tag.test.tsx on lines 32..35
superset-frontend/src/components/Tags/TagsList.test.tsx on lines 56..59
superset-frontend/src/explore/components/controls/TextControl/TextControl.test.tsx on lines 31..34
superset-frontend/src/features/tags/TagModal.test.tsx on lines 34..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

test('should render', () => {
  const { container } = render(<ProgressBar {...mockedProps} />);
  expect(container).toBeInTheDocument();
});
superset-frontend/src/components/Badge/Badge.test.tsx on lines 27..30
superset-frontend/src/components/Datasource/Field.test.tsx on lines 34..37
superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx on lines 38..41
superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx on lines 42..47
superset-frontend/src/components/ErrorMessage/ErrorAlert.test.tsx on lines 56..59
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx on lines 41..44
superset-frontend/src/components/ErrorMessage/IssueCode.test.tsx on lines 28..31
superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx on lines 57..60
superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx on lines 56..59
superset-frontend/src/components/ModalTrigger/ModalTrigger.test.tsx on lines 28..31
superset-frontend/src/components/Slider/Slider.test.tsx on lines 29..32
superset-frontend/src/components/TableView/TableView.test.tsx on lines 46..49
superset-frontend/src/components/Tags/Tag.test.tsx on lines 32..35
superset-frontend/src/components/Tags/TagsList.test.tsx on lines 56..59
superset-frontend/src/explore/components/controls/TextControl/TextControl.test.tsx on lines 31..34
superset-frontend/src/features/tags/TagModal.test.tsx on lines 34..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

test('should render', () => {
  const { container } = render(<Slider {...mockedProps} />);
  expect(container).toBeInTheDocument();
});
Severity: Major
Found in superset-frontend/src/components/Slider/Slider.test.tsx and 16 other locations - About 55 mins to fix
superset-frontend/src/components/Badge/Badge.test.tsx on lines 27..30
superset-frontend/src/components/Datasource/Field.test.tsx on lines 34..37
superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx on lines 38..41
superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx on lines 42..47
superset-frontend/src/components/ErrorMessage/ErrorAlert.test.tsx on lines 56..59
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx on lines 41..44
superset-frontend/src/components/ErrorMessage/IssueCode.test.tsx on lines 28..31
superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx on lines 57..60
superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx on lines 56..59
superset-frontend/src/components/ModalTrigger/ModalTrigger.test.tsx on lines 28..31
superset-frontend/src/components/ProgressBar/ProgressBar.test.tsx on lines 26..29
superset-frontend/src/components/TableView/TableView.test.tsx on lines 46..49
superset-frontend/src/components/Tags/Tag.test.tsx on lines 32..35
superset-frontend/src/components/Tags/TagsList.test.tsx on lines 56..59
superset-frontend/src/explore/components/controls/TextControl/TextControl.test.tsx on lines 31..34
superset-frontend/src/features/tags/TagModal.test.tsx on lines 34..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

test('should render', () => {
  const { container } = render(<Badge {...mockedProps} />);
  expect(container).toBeInTheDocument();
});
Severity: Major
Found in superset-frontend/src/components/Badge/Badge.test.tsx and 16 other locations - About 55 mins to fix
superset-frontend/src/components/Datasource/Field.test.tsx on lines 34..37
superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx on lines 38..41
superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx on lines 42..47
superset-frontend/src/components/ErrorMessage/ErrorAlert.test.tsx on lines 56..59
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx on lines 41..44
superset-frontend/src/components/ErrorMessage/IssueCode.test.tsx on lines 28..31
superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx on lines 57..60
superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx on lines 56..59
superset-frontend/src/components/ModalTrigger/ModalTrigger.test.tsx on lines 28..31
superset-frontend/src/components/ProgressBar/ProgressBar.test.tsx on lines 26..29
superset-frontend/src/components/Slider/Slider.test.tsx on lines 29..32
superset-frontend/src/components/TableView/TableView.test.tsx on lines 46..49
superset-frontend/src/components/Tags/Tag.test.tsx on lines 32..35
superset-frontend/src/components/Tags/TagsList.test.tsx on lines 56..59
superset-frontend/src/explore/components/controls/TextControl/TextControl.test.tsx on lines 31..34
superset-frontend/src/features/tags/TagModal.test.tsx on lines 34..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

test('should render', () => {
  const { container } = render(<TimeoutErrorMessage {...mockedProps} />);
  expect(container).toBeInTheDocument();
});
superset-frontend/src/components/Badge/Badge.test.tsx on lines 27..30
superset-frontend/src/components/Datasource/Field.test.tsx on lines 34..37
superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx on lines 38..41
superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx on lines 42..47
superset-frontend/src/components/ErrorMessage/ErrorAlert.test.tsx on lines 56..59
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx on lines 41..44
superset-frontend/src/components/ErrorMessage/IssueCode.test.tsx on lines 28..31
superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx on lines 57..60
superset-frontend/src/components/ModalTrigger/ModalTrigger.test.tsx on lines 28..31
superset-frontend/src/components/ProgressBar/ProgressBar.test.tsx on lines 26..29
superset-frontend/src/components/Slider/Slider.test.tsx on lines 29..32
superset-frontend/src/components/TableView/TableView.test.tsx on lines 46..49
superset-frontend/src/components/Tags/Tag.test.tsx on lines 32..35
superset-frontend/src/components/Tags/TagsList.test.tsx on lines 56..59
superset-frontend/src/explore/components/controls/TextControl/TextControl.test.tsx on lines 31..34
superset-frontend/src/features/tags/TagModal.test.tsx on lines 34..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

test('should render', () => {
  const { container } = render(<TableView {...mockedProps} />);
  expect(container).toBeInTheDocument();
});
Severity: Major
Found in superset-frontend/src/components/TableView/TableView.test.tsx and 16 other locations - About 55 mins to fix
superset-frontend/src/components/Badge/Badge.test.tsx on lines 27..30
superset-frontend/src/components/Datasource/Field.test.tsx on lines 34..37
superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx on lines 38..41
superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx on lines 42..47
superset-frontend/src/components/ErrorMessage/ErrorAlert.test.tsx on lines 56..59
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx on lines 41..44
superset-frontend/src/components/ErrorMessage/IssueCode.test.tsx on lines 28..31
superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx on lines 57..60
superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx on lines 56..59
superset-frontend/src/components/ModalTrigger/ModalTrigger.test.tsx on lines 28..31
superset-frontend/src/components/ProgressBar/ProgressBar.test.tsx on lines 26..29
superset-frontend/src/components/Slider/Slider.test.tsx on lines 29..32
superset-frontend/src/components/Tags/Tag.test.tsx on lines 32..35
superset-frontend/src/components/Tags/TagsList.test.tsx on lines 56..59
superset-frontend/src/explore/components/controls/TextControl/TextControl.test.tsx on lines 31..34
superset-frontend/src/features/tags/TagModal.test.tsx on lines 34..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

test('should render', () => {
  const { container } = render(<TagModal {...mockedProps} />);
  expect(container).toBeInTheDocument();
});
Severity: Major
Found in superset-frontend/src/features/tags/TagModal.test.tsx and 16 other locations - About 55 mins to fix
superset-frontend/src/components/Badge/Badge.test.tsx on lines 27..30
superset-frontend/src/components/Datasource/Field.test.tsx on lines 34..37
superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx on lines 38..41
superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx on lines 42..47
superset-frontend/src/components/ErrorMessage/ErrorAlert.test.tsx on lines 56..59
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx on lines 41..44
superset-frontend/src/components/ErrorMessage/IssueCode.test.tsx on lines 28..31
superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx on lines 57..60
superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx on lines 56..59
superset-frontend/src/components/ModalTrigger/ModalTrigger.test.tsx on lines 28..31
superset-frontend/src/components/ProgressBar/ProgressBar.test.tsx on lines 26..29
superset-frontend/src/components/Slider/Slider.test.tsx on lines 29..32
superset-frontend/src/components/TableView/TableView.test.tsx on lines 46..49
superset-frontend/src/components/Tags/Tag.test.tsx on lines 32..35
superset-frontend/src/components/Tags/TagsList.test.tsx on lines 56..59
superset-frontend/src/explore/components/controls/TextControl/TextControl.test.tsx on lines 31..34

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

test('should render', () => {
  const { container } = render(<TextControl {...mockedProps} />);
  expect(container).toBeInTheDocument();
});
superset-frontend/src/components/Badge/Badge.test.tsx on lines 27..30
superset-frontend/src/components/Datasource/Field.test.tsx on lines 34..37
superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx on lines 38..41
superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx on lines 42..47
superset-frontend/src/components/ErrorMessage/ErrorAlert.test.tsx on lines 56..59
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx on lines 41..44
superset-frontend/src/components/ErrorMessage/IssueCode.test.tsx on lines 28..31
superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx on lines 57..60
superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx on lines 56..59
superset-frontend/src/components/ModalTrigger/ModalTrigger.test.tsx on lines 28..31
superset-frontend/src/components/ProgressBar/ProgressBar.test.tsx on lines 26..29
superset-frontend/src/components/Slider/Slider.test.tsx on lines 29..32
superset-frontend/src/components/TableView/TableView.test.tsx on lines 46..49
superset-frontend/src/components/Tags/Tag.test.tsx on lines 32..35
superset-frontend/src/components/Tags/TagsList.test.tsx on lines 56..59
superset-frontend/src/features/tags/TagModal.test.tsx on lines 34..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

export default class ScatterChartPlugin extends ChartPlugin {
  constructor() {
    super({
      loadChart: () => import('./Scatter'),
      controlPanel,
superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/index.ts on lines 36..45
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Arc/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Grid/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Hex/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/index.ts on lines 36..45
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/index.ts on lines 38..47

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

test('should render', () => {
  const { container } = render(<TagsList {...mockedProps} />);
  expect(container).toBeInTheDocument();
});
Severity: Major
Found in superset-frontend/src/components/Tags/TagsList.test.tsx and 16 other locations - About 55 mins to fix
superset-frontend/src/components/Badge/Badge.test.tsx on lines 27..30
superset-frontend/src/components/Datasource/Field.test.tsx on lines 34..37
superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx on lines 38..41
superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx on lines 42..47
superset-frontend/src/components/ErrorMessage/ErrorAlert.test.tsx on lines 56..59
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx on lines 41..44
superset-frontend/src/components/ErrorMessage/IssueCode.test.tsx on lines 28..31
superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx on lines 57..60
superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx on lines 56..59
superset-frontend/src/components/ModalTrigger/ModalTrigger.test.tsx on lines 28..31
superset-frontend/src/components/ProgressBar/ProgressBar.test.tsx on lines 26..29
superset-frontend/src/components/Slider/Slider.test.tsx on lines 29..32
superset-frontend/src/components/TableView/TableView.test.tsx on lines 46..49
superset-frontend/src/components/Tags/Tag.test.tsx on lines 32..35
superset-frontend/src/explore/components/controls/TextControl/TextControl.test.tsx on lines 31..34
superset-frontend/src/features/tags/TagModal.test.tsx on lines 34..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

export default class GeojsonChartPlugin extends ChartPlugin {
  constructor() {
    super({
      loadChart: () => import('./Geojson'),
      controlPanel,
superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/index.ts on lines 36..45
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Arc/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Grid/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Hex/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/index.ts on lines 36..45
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/index.ts on lines 46..55
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/index.ts on lines 38..47

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

test('should render', () => {
  const { container } = render(<BasicErrorAlert {...mockedProps} />);
  expect(container).toBeInTheDocument();
});
superset-frontend/src/components/Badge/Badge.test.tsx on lines 27..30
superset-frontend/src/components/Datasource/Field.test.tsx on lines 34..37
superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx on lines 42..47
superset-frontend/src/components/ErrorMessage/ErrorAlert.test.tsx on lines 56..59
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx on lines 41..44
superset-frontend/src/components/ErrorMessage/IssueCode.test.tsx on lines 28..31
superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx on lines 57..60
superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx on lines 56..59
superset-frontend/src/components/ModalTrigger/ModalTrigger.test.tsx on lines 28..31
superset-frontend/src/components/ProgressBar/ProgressBar.test.tsx on lines 26..29
superset-frontend/src/components/Slider/Slider.test.tsx on lines 29..32
superset-frontend/src/components/TableView/TableView.test.tsx on lines 46..49
superset-frontend/src/components/Tags/Tag.test.tsx on lines 32..35
superset-frontend/src/components/Tags/TagsList.test.tsx on lines 56..59
superset-frontend/src/explore/components/controls/TextControl/TextControl.test.tsx on lines 31..34
superset-frontend/src/features/tags/TagModal.test.tsx on lines 34..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

export default class ScreengridChartPlugin extends ChartPlugin {
  constructor() {
    super({
      loadChart: () => import('./Screengrid'),
      controlPanel,
superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/index.ts on lines 36..45
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Arc/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Grid/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Hex/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/index.ts on lines 36..45
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/index.ts on lines 46..55

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

export default class PolygonChartPlugin extends ChartPlugin {
  constructor() {
    super({
      loadChart: () => import('./Polygon'),
      controlPanel,
superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/index.ts on lines 36..45
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Arc/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Grid/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Hex/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/index.ts on lines 36..45
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/index.ts on lines 46..55
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/index.ts on lines 38..47

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

export default class GridChartPlugin extends ChartPlugin {
  constructor() {
    super({
      loadChart: () => import('./Grid'),
      controlPanel,
superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/index.ts on lines 36..45
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Arc/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Hex/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/index.ts on lines 36..45
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/index.ts on lines 38..47
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/index.ts on lines 46..55
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/index.ts on lines 38..47

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

test('should render', () => {
  const { container } = render(<Tag {...mockedProps} />);
  expect(container).toBeInTheDocument();
});
Severity: Major
Found in superset-frontend/src/components/Tags/Tag.test.tsx and 16 other locations - About 55 mins to fix
superset-frontend/src/components/Badge/Badge.test.tsx on lines 27..30
superset-frontend/src/components/Datasource/Field.test.tsx on lines 34..37
superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx on lines 38..41
superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.test.tsx on lines 42..47
superset-frontend/src/components/ErrorMessage/ErrorAlert.test.tsx on lines 56..59
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.test.tsx on lines 41..44
superset-frontend/src/components/ErrorMessage/IssueCode.test.tsx on lines 28..31
superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.test.tsx on lines 57..60
superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.test.tsx on lines 56..59
superset-frontend/src/components/ModalTrigger/ModalTrigger.test.tsx on lines 28..31
superset-frontend/src/components/ProgressBar/ProgressBar.test.tsx on lines 26..29
superset-frontend/src/components/Slider/Slider.test.tsx on lines 29..32
superset-frontend/src/components/TableView/TableView.test.tsx on lines 46..49
superset-frontend/src/components/Tags/TagsList.test.tsx on lines 56..59
superset-frontend/src/explore/components/controls/TextControl/TextControl.test.tsx on lines 31..34
superset-frontend/src/features/tags/TagModal.test.tsx on lines 34..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language