airbnb/caravel

View on GitHub
superset-frontend/src/features/datasets/styles.ts

Summary

Maintainability
C
1 day
Test Coverage

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

export const StyledCreateDatasetTitle = styled.div`
  ${({ theme }) => `
  margin: ${theme.gridUnit * 4}px;
  font-size: ${theme.typography.sizes.xl}px;
  font-weight: ${theme.typography.weights.bold};
Severity: Major
Found in superset-frontend/src/features/datasets/styles.ts and 1 other location - About 2 hrs to fix
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx on lines 40..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 83.

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 const StyledLayoutHeader = styled.div`
  ${({ theme }) => `
  flex: 0 0 auto;
  height: ${theme.gridUnit * 16}px;
  border-bottom: 2px solid ${theme.colors.grayscale.light2};
Severity: Major
Found in superset-frontend/src/features/datasets/styles.ts and 1 other location - About 2 hrs to fix
superset-frontend/src/components/Select/styles.tsx on lines 121..133

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

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

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

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

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

Refactorings

Further Reading

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

export const StyledLayoutRightPanel = styled.div`
  ${({ theme }) => `
  border-left: 1px solid ${theme.colors.grayscale.light2};
  color: ${theme.colors.success.base};
  `}
Severity: Major
Found in superset-frontend/src/features/datasets/styles.ts and 4 other locations - About 1 hr to fix
superset-frontend/src/components/ListView/CrossLinks.tsx on lines 35..61
superset-frontend/src/components/TruncatedList/index.tsx on lines 88..94
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTitle.tsx on lines 32..40
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DependencyList.tsx on lines 43..54

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

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

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

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

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

Refactorings

Further Reading

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

export const StyledLayoutLeftPanel = styled.div`
  ${({ theme }) => `
  height: 100%;
  border-right: 1px solid ${theme.colors.grayscale.light2};
  `}
Severity: Major
Found in superset-frontend/src/features/datasets/styles.ts and 4 other locations - About 1 hr to fix
superset-frontend/src/dashboard/components/OverwriteConfirm/OverwriteConfirmModal.tsx on lines 37..41
superset-frontend/src/dashboard/components/OverwriteConfirm/OverwriteConfirmModal.tsx on lines 43..56
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/VerticalCollapse.tsx on lines 45..49
superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.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 55.

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

export const HeaderComponentStyles = styled.div`
  .ant-btn {
    span {
      margin-right: 0;
    }
Severity: Major
Found in superset-frontend/src/features/datasets/styles.ts and 6 other locations - About 40 mins to fix
superset-frontend/packages/superset-ui-demo/storybook/shared/components/ResizableChartDemo.tsx on lines 25..33
superset-frontend/src/dashboard/components/nativeFilters/FilterCard/Styles.ts on lines 85..87
superset-frontend/src/explore/components/controls/OptionControls/index.tsx on lines 78..82
superset-frontend/src/features/datasets/styles.ts on lines 21..26
superset-frontend/src/features/reports/ReportModal/styles.tsx on lines 77..79
superset-frontend/src/views/CRUD/utils.tsx on lines 69..71

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

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

export const StyledLayoutWrapper = styled.div`
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background-color: ${({ theme }) => theme.colors.grayscale.light5};
Severity: Major
Found in superset-frontend/src/features/datasets/styles.ts and 6 other locations - About 40 mins to fix
superset-frontend/packages/superset-ui-demo/storybook/shared/components/ResizableChartDemo.tsx on lines 25..33
superset-frontend/src/dashboard/components/nativeFilters/FilterCard/Styles.ts on lines 85..87
superset-frontend/src/explore/components/controls/OptionControls/index.tsx on lines 78..82
superset-frontend/src/features/datasets/styles.ts on lines 120..132
superset-frontend/src/features/reports/ReportModal/styles.tsx on lines 77..79
superset-frontend/src/views/CRUD/utils.tsx on lines 69..71

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

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

export const FooterRow = styled(Row)`
  flex: 0 0 auto;
  height: ${({ theme }) => theme.gridUnit * 16}px;
  z-index: 0;
`;
Severity: Major
Found in superset-frontend/src/features/datasets/styles.ts and 3 other locations - About 30 mins to fix
superset-frontend/src/features/databases/DatabaseModal/styles.ts on lines 564..566
superset-frontend/src/features/reports/ReportModal/styles.tsx on lines 85..87
superset-frontend/src/features/reports/ReportModal/styles.tsx on lines 106..109

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

There are no issues that match your filters.

Category
Status