airbnb/caravel

View on GitHub

Showing 3,672 of 6,072 total issues

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

const {
  logAxis,
  markerEnabled,
  markerSize,
  minorSplitLine,
superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/transformProps.ts on lines 49..58
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/controlPanel.tsx on lines 45..54
superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/transformProps.ts on lines 152..161
superset-frontend/plugins/plugin-chart-echarts/src/utils/eventHandlers.ts on lines 149..158
superset-frontend/src/components/Label/index.tsx on lines 55..64
superset-frontend/src/dashboard/containers/Dashboard.ts on lines 39..48
superset-frontend/src/filters/components/TimeColumn/transformProps.ts on lines 24..33
superset-frontend/src/pages/Chart/index.tsx on lines 86..95

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

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

  const {
    alert,
    primary,
    secondary,
    grayscale,
Severity: Major
Found in superset-frontend/src/components/Label/index.tsx and 8 other locations - About 40 mins to fix
superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/transformProps.ts on lines 49..58
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/controlPanel.tsx on lines 45..54
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/controlPanel.tsx on lines 45..54
superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/transformProps.ts on lines 152..161
superset-frontend/plugins/plugin-chart-echarts/src/utils/eventHandlers.ts on lines 149..158
superset-frontend/src/dashboard/containers/Dashboard.ts on lines 39..48
superset-frontend/src/filters/components/TimeColumn/transformProps.ts on lines 24..33
superset-frontend/src/pages/Chart/index.tsx on lines 86..95

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

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

  const {
    datasources,
    sliceEntities,
    dataMask,
    dashboardInfo,
Severity: Major
Found in superset-frontend/src/dashboard/containers/Dashboard.ts and 8 other locations - About 40 mins to fix
superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/transformProps.ts on lines 49..58
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/controlPanel.tsx on lines 45..54
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/controlPanel.tsx on lines 45..54
superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/transformProps.ts on lines 152..161
superset-frontend/plugins/plugin-chart-echarts/src/utils/eventHandlers.ts on lines 149..158
superset-frontend/src/components/Label/index.tsx on lines 55..64
superset-frontend/src/filters/components/TimeColumn/transformProps.ts on lines 24..33
superset-frontend/src/pages/Chart/index.tsx on lines 86..95

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

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

  const {
    behaviors,
    formData,
    height,
    hooks,
superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/transformProps.ts on lines 49..58
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/controlPanel.tsx on lines 45..54
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/controlPanel.tsx on lines 45..54
superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/transformProps.ts on lines 152..161
superset-frontend/plugins/plugin-chart-echarts/src/utils/eventHandlers.ts on lines 149..158
superset-frontend/src/components/Label/index.tsx on lines 55..64
superset-frontend/src/dashboard/containers/Dashboard.ts on lines 39..48
superset-frontend/src/pages/Chart/index.tsx on lines 86..95

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

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

  const {
    width,
    height,
    formData,
    hooks,
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/controlPanel.tsx on lines 45..54
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/controlPanel.tsx on lines 45..54
superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/transformProps.ts on lines 152..161
superset-frontend/plugins/plugin-chart-echarts/src/utils/eventHandlers.ts on lines 149..158
superset-frontend/src/components/Label/index.tsx on lines 55..64
superset-frontend/src/dashboard/containers/Dashboard.ts on lines 39..48
superset-frontend/src/filters/components/TimeColumn/transformProps.ts on lines 24..33
superset-frontend/src/pages/Chart/index.tsx on lines 86..95

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

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

        [
          {
            name: 'show_percentage',
            config: {
              type: 'CheckboxControl',
superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.tsx on lines 273..286
superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.tsx on lines 301..314
superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts on lines 120..131
superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts on lines 132..143
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx on lines 269..282
superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx on lines 251..262

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

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

        [
          {
            name: 'show_perc',
            config: {
              type: 'CheckboxControl',
superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.tsx on lines 301..314
superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts on lines 120..131
superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts on lines 132..143
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx on lines 241..254
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx on lines 269..282
superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx on lines 251..262

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

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

        [
          {
            name: 'transposePivot',
            config: {
              type: 'CheckboxControl',
superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.tsx on lines 273..286
superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.tsx on lines 301..314
superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts on lines 120..131
superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts on lines 132..143
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx on lines 241..254
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx on lines 269..282

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

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

        [
          {
            name: 'cumulative',
            config: {
              type: 'CheckboxControl',
superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.tsx on lines 273..286
superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.tsx on lines 301..314
superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts on lines 120..131
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx on lines 241..254
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx on lines 269..282
superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx on lines 251..262

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

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

        [
          {
            name: 'normalized',
            config: {
              type: 'CheckboxControl',
superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.tsx on lines 273..286
superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.tsx on lines 301..314
superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts on lines 120..131
superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts on lines 132..143
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx on lines 241..254
superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx on lines 251..262

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

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

        [
          {
            name: 'normalized',
            config: {
              type: 'CheckboxControl',
superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.tsx on lines 273..286
superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts on lines 120..131
superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts on lines 132..143
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx on lines 241..254
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx on lines 269..282
superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx on lines 251..262

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

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

        [
          {
            name: 'normalized',
            config: {
              type: 'CheckboxControl',
superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.tsx on lines 273..286
superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.tsx on lines 301..314
superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts on lines 132..143
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx on lines 241..254
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx on lines 269..282
superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx on lines 251..262

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

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

      expect(getByTestId('mock-explore-chart-panel')).toHaveTextContent(
        JSON.stringify({
          show_cell_bars: updatedExploreFormData.show_cell_bars,
        }).slice(1, -1),
      );
Severity: Major
Found in superset-frontend/src/pages/Chart/Chart.test.tsx and 4 other locations - About 40 mins to fix
superset-frontend/src/SqlLab/components/AceEditorWrapper/AceEditorWrapper.test.tsx on lines 66..68
superset-frontend/src/SqlLab/components/AceEditorWrapper/AceEditorWrapper.test.tsx on lines 90..92
superset-frontend/src/pages/Chart/Chart.test.tsx on lines 118..123
superset-frontend/src/pages/Chart/Chart.test.tsx on lines 166..170

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

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

      expect(getByTestId('mock-explore-chart-panel')).toHaveTextContent(
        JSON.stringify({ color_scheme: dashboardFormData.color_scheme }).slice(
          1,
          -1,
        ),
Severity: Major
Found in superset-frontend/src/pages/Chart/Chart.test.tsx and 4 other locations - About 40 mins to fix
superset-frontend/src/SqlLab/components/AceEditorWrapper/AceEditorWrapper.test.tsx on lines 66..68
superset-frontend/src/SqlLab/components/AceEditorWrapper/AceEditorWrapper.test.tsx on lines 90..92
superset-frontend/src/pages/Chart/Chart.test.tsx on lines 166..170
superset-frontend/src/pages/Chart/Chart.test.tsx on lines 183..187

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

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

    expect(getByTestId('react-ace')).toHaveTextContent(
      JSON.stringify({ value: defaultQueryEditor.sql }).slice(1, -1),
    );
superset-frontend/src/SqlLab/components/AceEditorWrapper/AceEditorWrapper.test.tsx on lines 90..92
superset-frontend/src/pages/Chart/Chart.test.tsx on lines 118..123
superset-frontend/src/pages/Chart/Chart.test.tsx on lines 166..170
superset-frontend/src/pages/Chart/Chart.test.tsx on lines 183..187

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

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

    expect(getByTestId('react-ace')).toHaveTextContent(
      JSON.stringify({ value: defaultQueryEditor.sql }).slice(1, -1),
    );
superset-frontend/src/SqlLab/components/AceEditorWrapper/AceEditorWrapper.test.tsx on lines 66..68
superset-frontend/src/pages/Chart/Chart.test.tsx on lines 118..123
superset-frontend/src/pages/Chart/Chart.test.tsx on lines 166..170
superset-frontend/src/pages/Chart/Chart.test.tsx on lines 183..187

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

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

      expect(getByTestId('mock-explore-chart-panel')).toHaveTextContent(
        JSON.stringify({
          show_cell_bars: dashboardFormData.show_cell_bars,
        }).slice(1, -1),
      );
Severity: Major
Found in superset-frontend/src/pages/Chart/Chart.test.tsx and 4 other locations - About 40 mins to fix
superset-frontend/src/SqlLab/components/AceEditorWrapper/AceEditorWrapper.test.tsx on lines 66..68
superset-frontend/src/SqlLab/components/AceEditorWrapper/AceEditorWrapper.test.tsx on lines 90..92
superset-frontend/src/pages/Chart/Chart.test.tsx on lines 118..123
superset-frontend/src/pages/Chart/Chart.test.tsx on lines 183..187

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

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

    if (coltypeMapping[xAxisColumns[index]] === GenericDataType.Temporal) {
      if (typeof value === 'string') {
        return getTimeFormatter(xAxisTimeFormat)(Number.parseInt(value, 10));
      }
      return getTimeFormatter(xAxisTimeFormat)(value);
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts on lines 109..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 48.

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

      if (colType === GenericDataType.Temporal) {
        if (typeof value === 'string') {
          return getTimeFormatter(xAxisTimeFormat)(Number.parseInt(value, 10));
        }
        return getTimeFormatter(xAxisTimeFormat)(value);
superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/transformProps.ts on lines 322..327

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

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

  appliedIndicators: [
    {
      column: 'country_name',
      name: 'Country',
      value: [],
superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/DetailsPanel.test.tsx on lines 42..56
superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/DetailsPanel.test.tsx on lines 72..86
superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/DetailsPanel.test.tsx on lines 87..101

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

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