airbnb/caravel

View on GitHub

Showing 3,672 of 6,072 total issues

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

jest.mock(
  'src/dashboard/components/gridComponents/new/DraggableNewComponent',
  () =>
    ({ type, id }) => (
      <div data-test="mock-draggable-new-component">{`${type}:${id}`}</div>
superset-frontend/src/dashboard/components/gridComponents/new/NewColumn.test.jsx on lines 26..32
superset-frontend/src/dashboard/components/gridComponents/new/NewDivider.test.jsx on lines 26..32
superset-frontend/src/dashboard/components/gridComponents/new/NewHeader.test.jsx on lines 26..32
superset-frontend/src/dashboard/components/gridComponents/new/NewRow.test.jsx on lines 26..32

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

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

test('should set appropriate type and id', () => {
  const { getByTestId } = setup();
  expect(getByTestId('mock-draggable-new-component')).toHaveTextContent(
    `${HEADER_TYPE}:${NEW_HEADER_ID}`,
  );
superset-frontend/src/dashboard/components/gridComponents/new/NewColumn.test.jsx on lines 43..48
superset-frontend/src/dashboard/components/gridComponents/new/NewDivider.test.jsx on lines 43..48
superset-frontend/src/dashboard/components/gridComponents/new/NewRow.test.jsx on lines 43..48
superset-frontend/src/dashboard/components/gridComponents/new/NewTabs.test.jsx on lines 43..48

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

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

test('should set appropriate type and id', () => {
  const { getByTestId } = setup();
  expect(getByTestId('mock-draggable-new-component')).toHaveTextContent(
    `${DIVIDER_TYPE}:${NEW_DIVIDER_ID}`,
  );
superset-frontend/src/dashboard/components/gridComponents/new/NewColumn.test.jsx on lines 43..48
superset-frontend/src/dashboard/components/gridComponents/new/NewHeader.test.jsx on lines 43..48
superset-frontend/src/dashboard/components/gridComponents/new/NewRow.test.jsx on lines 43..48
superset-frontend/src/dashboard/components/gridComponents/new/NewTabs.test.jsx on lines 43..48

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

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

jest.mock(
  'src/dashboard/components/gridComponents/new/DraggableNewComponent',
  () =>
    ({ type, id }) => (
      <div data-test="mock-draggable-new-component">{`${type}:${id}`}</div>
superset-frontend/src/dashboard/components/gridComponents/new/NewColumn.test.jsx on lines 26..32
superset-frontend/src/dashboard/components/gridComponents/new/NewHeader.test.jsx on lines 26..32
superset-frontend/src/dashboard/components/gridComponents/new/NewRow.test.jsx on lines 26..32
superset-frontend/src/dashboard/components/gridComponents/new/NewTabs.test.jsx on lines 26..32

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

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

test('should set appropriate type and id', () => {
  const { getByTestId } = setup();
  expect(getByTestId('mock-draggable-new-component')).toHaveTextContent(
    `${COLUMN_TYPE}:${NEW_COLUMN_ID}`,
  );
superset-frontend/src/dashboard/components/gridComponents/new/NewDivider.test.jsx on lines 43..48
superset-frontend/src/dashboard/components/gridComponents/new/NewHeader.test.jsx on lines 43..48
superset-frontend/src/dashboard/components/gridComponents/new/NewRow.test.jsx on lines 43..48
superset-frontend/src/dashboard/components/gridComponents/new/NewTabs.test.jsx on lines 43..48

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

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 dropResult = {
      source: { id: NEW_COMPONENTS_SOURCE_ID, type: '' },
      destination: {
        id: DASHBOARD_GRID_ID,
        type: DASHBOARD_GRID_TYPE,
superset-frontend/src/dashboard/reducers/dashboardLayout.test.js on lines 281..289

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

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

async function mountAndWait(props) {
  const mounted = mount(
    <Provider store={store}>
      <AnnotationList {...props} />
    </Provider>,
superset-frontend/src/pages/ExecutionLogList/ExecutionLogList.test.jsx on lines 64..73

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

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

  it('renders a StyledColumnOption given a column', () => {
    render(<FilterDefinitionOption option={{ column_name: 'a_column' }} />);
    expect(screen.getByText('a_column')).toBeVisible();
  });
superset-frontend/src/explore/components/controls/MetricControl/FilterDefinitionOption.test.jsx on lines 43..50

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

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 dropResult = {
      source: { id: NEW_COMPONENTS_SOURCE_ID, type: '' },
      destination: {
        id: DASHBOARD_ROOT_ID,
        type: DASHBOARD_ROOT_TYPE,
superset-frontend/src/dashboard/reducers/dashboardLayout.test.js on lines 441..449

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

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

  it('renders the metric name given a saved metric', () => {
    render(
      <FilterDefinitionOption
        option={{ saved_metric_name: 'my_custom_metric' }}
      />,
superset-frontend/src/explore/components/controls/MetricControl/FilterDefinitionOption.test.jsx on lines 33..36

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

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

async function mountAndWait(props) {
  const mounted = mount(
    <Provider store={store}>
      <ExecutionLog {...props} />
    </Provider>,
superset-frontend/src/pages/AnnotationList/AnnotationList.test.jsx on lines 76..85

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

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

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

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

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

Refactorings

Further Reading

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

export const richTooltip: CustomControlItem = {
  name: 'rich_tooltip',
  config: {
    type: 'CheckboxControl',
    label: t('Rich Tooltip'),
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 107..116
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 301..310
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 312..321
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 59..68
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 94..103
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 105..114
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 152..161
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 243..252
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 286..295
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 310..319

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

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

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

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

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

Refactorings

Further Reading

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

export const showLegend: CustomControlItem = {
  name: 'show_legend',
  config: {
    type: 'CheckboxControl',
    label: t('Legend'),
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 107..116
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 301..310
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 312..321
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 59..68
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 94..103
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 105..114
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 243..252
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 286..295
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 297..308
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 310..319

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

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

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

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

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

Refactorings

Further Reading

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

export const showBarValue: CustomControlItem = {
  name: 'show_bar_value',
  config: {
    type: 'CheckboxControl',
    label: t('Bar Values'),
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 107..116
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 301..310
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 312..321
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 59..68
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 94..103
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 105..114
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 152..161
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 243..252
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 286..295
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 297..308

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

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

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

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

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

Refactorings

Further Reading

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

export const xAxisShowMinmax: CustomControlItem = {
  name: 'x_axis_showminmax',
  config: {
    type: 'CheckboxControl',
    label: t('X bounds'),
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 107..116
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 301..310
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 312..321
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 59..68
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 94..103
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 105..114
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 152..161
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 243..252
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 297..308
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 310..319

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

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

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

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

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

Refactorings

Further Reading

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

export const yAxis2ShowMinmax: CustomControlItem = {
  name: 'y_axis_2_showminmax',
  config: {
    type: 'CheckboxControl',
    label: t('Y 2 bounds'),
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 107..116
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 301..310
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 312..321
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 59..68
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 94..103
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 152..161
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 243..252
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 286..295
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 297..308
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 310..319

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

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

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

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

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

Refactorings

Further Reading

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

export const yAxisShowMinmax: CustomControlItem = {
  name: 'y_axis_showminmax',
  config: {
    type: 'CheckboxControl',
    label: t('Y bounds'),
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 107..116
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 301..310
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 312..321
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 59..68
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 105..114
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 152..161
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 243..252
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 286..295
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 297..308
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 310..319

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

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

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

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

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

Refactorings

Further Reading

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

export const showValueControl: ControlSetItem = {
  name: 'show_value',
  config: {
    type: 'CheckboxControl',
    label: t('Show Value'),
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 301..310
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 312..321
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 59..68
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 94..103
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 105..114
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 152..161
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 243..252
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 286..295
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 297..308
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 310..319

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

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

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

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

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

Refactorings

Further Reading

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

export const forceCategorical: ControlSetItem = {
  name: 'forceCategorical',
  config: {
    type: 'CheckboxControl',
    label: t('Force categorical'),
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 107..116
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 301..310
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 59..68
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 94..103
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 105..114
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 152..161
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 243..252
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 286..295
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 297..308
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 310..319

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

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

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

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

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

Refactorings

Further Reading

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

export const yLogScale: CustomControlItem = {
  name: 'y_log_scale',
  config: {
    type: 'CheckboxControl',
    label: t('Y Log Scale'),
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 107..116
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 301..310
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx on lines 312..321
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 59..68
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 94..103
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 105..114
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 152..161
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 286..295
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 297..308
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx on lines 310..319

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

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