airbnb/caravel

View on GitHub

Showing 3,672 of 6,072 total issues

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

        try:
            params = json.loads(slc.params)
            convert_legacy_filters_into_adhoc(params)
            slc.params = json.dumps(params, sort_keys=True)
superset/migrations/versions/2019-10-10_13-52_1495eb914ad3_time_range.py on lines 54..57

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

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

def downgrade():
    with op.batch_alter_table("tab_state") as batch_op:
        batch_op.drop_constraint("saved_query_id", type_="foreignkey")
        batch_op.drop_column("saved_query_id")
superset/migrations/versions/2015-12-15_17-02_2591d77e9831_user_id.py on lines 39..42

Duplicated Code

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

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

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

Tuning

This issue has a mass of 38.

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

    with op.batch_alter_table("table_columns") as batch_op:
        batch_op.add_column(
            sa.Column(
                "advanced_data_type",
                sa.VARCHAR(255),
superset/migrations/versions/2020-06-21_19-50_a72cb0ebeb22_deprecate_dbs_perm_column.py on lines 37..39
superset/migrations/versions/2021-05-27_16-10_6f139c533bea_add_advanced_data_types_to_column_models.py on lines 42..46

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

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

    with op.batch_alter_table("columns") as batch_op:
        batch_op.add_column(
            sa.Column(
                "advanced_data_type",
                sa.VARCHAR(255),
superset/migrations/versions/2020-06-21_19-50_a72cb0ebeb22_deprecate_dbs_perm_column.py on lines 37..39
superset/migrations/versions/2021-05-27_16-10_6f139c533bea_add_advanced_data_types_to_column_models.py on lines 34..38

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

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

      failed: {
        config: {
          icon: <Icons.XSmall iconColor={theme.colors.error.base} />,
          label: t('Failed'),
        },
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 126..131
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 138..143
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 144..149
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 150..155
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 156..161
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 162..167
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 168..173
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 174..179

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

      pending: {
        config: {
          icon: <Icons.Queued iconColor={theme.colors.grayscale.base} />,
          label: t('Scheduled'),
        },
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 126..131
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 132..137
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 138..143
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 144..149
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 150..155
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 156..161
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 162..167
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 174..179

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

      running: {
        config: {
          icon: <Icons.Running iconColor={theme.colors.primary.base} />,
          label: t('Running'),
        },
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 126..131
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 132..137
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 138..143
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 150..155
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 156..161
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 162..167
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 168..173
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 174..179

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

      success: {
        config: {
          icon: <Icons.Check iconColor={theme.colors.success.base} />,
          label: t('Success'),
        },
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 132..137
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 138..143
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 144..149
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 150..155
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 156..161
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 162..167
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 168..173
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 174..179

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

      scheduled: {
        config: {
          icon: <Icons.Queued iconColor={theme.colors.grayscale.base} />,
          label: t('Scheduled'),
        },
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 126..131
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 132..137
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 138..143
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 144..149
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 150..155
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 156..161
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 168..173
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 174..179

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

      error: {
        config: {
          icon: <Icons.Error iconColor={theme.colors.error.base} />,
          label: t('Unknown Status'),
        },
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 126..131
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 132..137
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 138..143
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 144..149
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 150..155
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 156..161
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 162..167
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 168..173

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 9 locations. Consider refactoring.
Open

      fetching: {
        config: {
          icon: <Icons.Queued iconColor={theme.colors.primary.base} />,
          label: t('Fetching'),
        },
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 126..131
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 132..137
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 138..143
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 144..149
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 156..161
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 162..167
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 168..173
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 174..179

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

      timed_out: {
        config: {
          icon: <Icons.Offline iconColor={theme.colors.grayscale.light1} />,
          label: t('Offline'),
        },
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 126..131
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 132..137
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 138..143
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 144..149
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 150..155
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 162..167
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 168..173
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 174..179

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

      stopped: {
        config: {
          icon: <Icons.XSmall iconColor={theme.colors.error.base} />,
          label: t('Failed'),
        },
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 126..131
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 132..137
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 144..149
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 150..155
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 156..161
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 162..167
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 168..173
superset-frontend/src/SqlLab/components/QueryTable/index.tsx on lines 174..179

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

const SectionHeader = styled.span`
  ${({ theme }) => `
    font-size: ${theme.typography.sizes.m}px;
    line-height: 1.3;
  `}
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/features/datasets/styles.ts on lines 84..89

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

const StyledEditor = styled.div`
  ${({ theme }) => `
     table {
       border: 1px ${theme.colors.grayscale.light2} solid;
     }
superset-frontend/src/dashboard/components/OverwriteConfirm/OverwriteConfirmModal.tsx on lines 37..41
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
superset-frontend/src/features/datasets/styles.ts on lines 84..89

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

const StyledTitle = styled.h2`
  ${({ theme }) => `
     color:  ${theme.colors.grayscale.dark1}
   `}
`;
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
superset-frontend/src/features/datasets/styles.ts on lines 84..89

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

const StyledCrossFiltersTitle = styled.span`
  ${({ theme }) => `
    font-size: ${theme.typography.sizes.s}px;
  `}
`;
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/explore/components/DatasourcePanel/DatasourcePanelItem.tsx on lines 129..134
superset-frontend/src/features/datasets/styles.ts on lines 84..89

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

const ModalContentContainer = styled.div`
  ${({ theme }) => css`
    display: flex;
    height: 100%;
    & > div {
superset-frontend/src/dashboard/components/nativeFilters/FilterCard/Styles.ts on lines 78..83
superset-frontend/src/explore/components/DatasourcePanel/index.tsx on lines 117..125
superset-frontend/src/explore/components/controls/CurrencyControl/CurrencyControl.tsx on lines 44..60

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

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

        {extra.issue_codes
          .map<ReactNode>(issueCode => <IssueCode {...issueCode} />)
          .reduce((prev, curr) => [prev, <br />, curr])}
superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.tsx on lines 103..105

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

Severity
Category
Status
Source
Language