airbnb/caravel

View on GitHub

Showing 3,672 of 6,072 total issues

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

        chart?.queriesResponse?.[0]?.rejected_filters !==
          prevChart?.queriesResponse?.[0]?.rejected_filters ||
        chart?.queriesResponse?.[0]?.applied_filters !==
          prevChart?.queriesResponse?.[0]?.applied_filters ||
        nativeFilters !== prevNativeFilters ||
superset-frontend/src/dashboard/components/FiltersBadge/index.tsx on lines 179..184

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

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

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

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

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

Refactorings

Further Reading

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

const stateWithNonMenuAccessOnManage = {
  user: {
    email: 'nonaccess@test.com',
    firstName: 'nonaccess',
    isActive: true,
superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.test.tsx on lines 34..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 77.

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

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

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

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

Refactorings

Further Reading

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

const schemes = [
  {
    id: 'presetColors',
    label: 'Preset Colors',
    group: ColorSchemeGroup.Featured,
superset-frontend/packages/superset-ui-core/src/color/colorSchemes/categorical/superset.ts on lines 24..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 77.

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

  removeEventListener<K extends keyof StrictBroadcastChannelEventMap<T>>(
    type: K,
    listener: (
      this: BroadcastChannel,
      ev: StrictBroadcastChannelEventMap<T>[K],
Severity: Major
Found in superset-frontend/src/hooks/strictBroadcastChannel.ts and 1 other location - About 2 hrs to fix
superset-frontend/src/hooks/strictBroadcastChannel.ts on lines 32..39

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

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

        chart?.queriesResponse?.[0]?.rejected_filters !==
          prevChart?.queriesResponse?.[0]?.rejected_filters ||
        chart?.queriesResponse?.[0]?.applied_filters !==
          prevChart?.queriesResponse?.[0]?.applied_filters ||
        dashboardFilters !== prevDashboardFilters ||
superset-frontend/src/dashboard/components/FiltersBadge/index.tsx on lines 219..224

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

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

      {
        Header: t('Database'),
        key: 'database',
        id: 'database',
        input: 'select',
Severity: Major
Found in superset-frontend/src/pages/SavedQueryList/index.tsx and 1 other location - About 2 hrs to fix
superset-frontend/src/pages/QueryHistoryList/index.tsx on lines 364..381

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

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

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

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

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

Refactorings

Further Reading

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

const schemes = [
  {
    id: 'supersetColors',
    label: 'Superset Colors',
    group: ColorSchemeGroup.Featured,
superset-frontend/packages/superset-ui-core/src/color/colorSchemes/categorical/preset.ts on lines 24..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 77.

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

        if (chartId === NEW_CHART_SCOPING_ID) {
          delete newConfigs[NEW_CHART_SCOPING_ID];
        } else {
          newConfigs[chartId] = {
            id: chartId,
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingModal.tsx on lines 253..265

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

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

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

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

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

Refactorings

Further Reading

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

const stateWithOnlyUser = {
  user: {
    email: 'admin@test.com',
    firstName: 'admin',
    isActive: true,
superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.test.tsx on lines 67..80

Duplicated Code

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

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

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

Tuning

This issue has a mass of 77.

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

  addEventListener<K extends keyof StrictBroadcastChannelEventMap<T>>(
    type: K,
    listener: (
      this: BroadcastChannel,
      ev: StrictBroadcastChannelEventMap<T>[K],
Severity: Major
Found in superset-frontend/src/hooks/strictBroadcastChannel.ts and 1 other location - About 2 hrs to fix
superset-frontend/src/hooks/strictBroadcastChannel.ts on lines 45..52

Duplicated Code

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

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

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

Tuning

This issue has a mass of 77.

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

      {
        Header: t('Database'),
        key: 'database',
        id: 'database',
        input: 'select',
Severity: Major
Found in superset-frontend/src/pages/QueryHistoryList/index.tsx and 1 other location - About 2 hrs to fix
superset-frontend/src/pages/SavedQueryList/index.tsx on lines 458..478

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

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

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

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

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

Refactorings

Further Reading

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

    with op.batch_alter_table("columns", schema=None) as batch_op:
        batch_op.alter_column(
            "column_name",
            existing_type=sa.String(length=255),
            type_=sa.VARCHAR(length=256),
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 60..64
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 68..72
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 76..80
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 84..88
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 94..98
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 102..106
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 110..114

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

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

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

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

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

Refactorings

Further Reading

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

    with op.batch_alter_table("table_columns", schema=None) as batch_op:
        batch_op.alter_column(
            "column_name",
            existing_type=sa.VARCHAR(length=256),
            type_=sa.String(length=255),
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 60..64
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 68..72
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 84..88
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 94..98
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 102..106
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 110..114
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 118..122

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

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

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

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

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

Refactorings

Further Reading

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

    with op.batch_alter_table("table_columns", schema=None) as batch_op:
        batch_op.alter_column(
            "column_name",
            existing_type=sa.String(length=255),
            type_=sa.VARCHAR(length=256),
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 60..64
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 68..72
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 76..80
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 84..88
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 94..98
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 110..114
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 118..122

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

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

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

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

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

Refactorings

Further Reading

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

    with op.batch_alter_table("datasources", schema=None) as batch_op:
        batch_op.alter_column(
            "datasource_name",
            existing_type=sa.VARCHAR(length=256),
            type_=sa.String(length=255),
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 60..64
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 76..80
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 84..88
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 94..98
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 102..106
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 110..114
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 118..122

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

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

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

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

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

Refactorings

Further Reading

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

    with op.batch_alter_table("tables", schema=None) as batch_op:
        batch_op.alter_column(
            "schema",
            existing_type=sa.String(length=255),
            type_=sa.VARCHAR(length=256),
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 60..64
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 68..72
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 76..80
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 84..88
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 102..106
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 110..114
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 118..122

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

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

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

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

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

Refactorings

Further Reading

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

    with op.batch_alter_table("datasources", schema=None) as batch_op:
        batch_op.alter_column(
            "datasource_name",
            existing_type=sa.String(length=255),
            type_=sa.VARCHAR(length=256),
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 60..64
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 68..72
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 76..80
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 84..88
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 94..98
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 102..106
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 118..122

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

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

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

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

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

Refactorings

Further Reading

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

    with op.batch_alter_table("tables", schema=None) as batch_op:
        batch_op.alter_column(
            "schema",
            existing_type=sa.VARCHAR(length=256),
            type_=sa.String(length=255),
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 60..64
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 68..72
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 76..80
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 94..98
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 102..106
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 110..114
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 118..122

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

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

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

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

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

Refactorings

Further Reading

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

    with op.batch_alter_table("columns", schema=None) as batch_op:
        batch_op.alter_column(
            "column_name",
            existing_type=sa.VARCHAR(length=256),
            type_=sa.String(length=255),
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 68..72
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 76..80
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 84..88
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 94..98
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 102..106
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 110..114
superset/migrations/versions/2016-05-11_17-28_956a063c52b3_adjusting_key_length.py on lines 118..122

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

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

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

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

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

Refactorings

Further Reading

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

    const yAxis = d3.svg
      .axis()
      .scale(yRbScale)
      .outerTickSize(0)
      .tickValues(yRbScale.domain().filter((d, i) => !(i % yScaleInterval)))
superset-frontend/plugins/legacy-plugin-chart-heatmap/src/Heatmap.js on lines 378..383

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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