ant-design/ant-design

View on GitHub
components/config-provider/__tests__/style.test.tsx

Summary

Maintainability
F
3 wks
Test Coverage

File style.test.tsx has 1441 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';

import ConfigProvider from '..';
import { fireEvent, render } from '../../../tests/utils';
import Alert from '../../alert';
Severity: Major
Found in components/config-provider/__tests__/style.test.tsx - About 3 days to fix

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

      it('Should Typography className & style works', () => {
        const { container } = render(
          <ConfigProvider
            typography={{ className: 'cp-typography', style: { backgroundColor: 'red' } }}
          >
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 5 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 1528..1537

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

    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('Should Flex className & style works', () => {
        const { container } = render(
          <ConfigProvider flex={{ className: 'cp-flex', style: { backgroundColor: 'blue' } }}>
            <Flex>test</Flex>
          </ConfigProvider>,
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 5 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 340..351

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

    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('Should Menu style works', () => {
        const menuItems = [
          {
            label: 'Test Label',
            key: 'test',
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 4 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 1464..1485

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

    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('Should Tree style works', () => {
        const treeData = [
          {
            title: 'test-title',
            key: '0-0',
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 4 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 695..713

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

    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

      it('Should Pagination className & style works', () => {
        const { container } = render(
          <ConfigProvider
            pagination={{ className: 'cp-pagination', style: { backgroundColor: 'blue' } }}
          >
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 8 other locations - About 4 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 381..392
    components/config-provider/__tests__/style.test.tsx on lines 768..777
    components/config-provider/__tests__/style.test.tsx on lines 797..806
    components/config-provider/__tests__/style.test.tsx on lines 887..898
    components/config-provider/__tests__/style.test.tsx on lines 1033..1042
    components/config-provider/__tests__/style.test.tsx on lines 1044..1053
    components/config-provider/__tests__/style.test.tsx on lines 1055..1064
    components/config-provider/__tests__/style.test.tsx on lines 1487..1498

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

    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

      it('Should ColorPicker className & style works', () => {
        const { container } = render(
          <ConfigProvider
            colorPicker={{ className: 'cp-colorPicker', style: { backgroundColor: 'red' } }}
          >
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 8 other locations - About 4 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 381..392
    components/config-provider/__tests__/style.test.tsx on lines 768..777
    components/config-provider/__tests__/style.test.tsx on lines 797..806
    components/config-provider/__tests__/style.test.tsx on lines 887..898
    components/config-provider/__tests__/style.test.tsx on lines 918..929
    components/config-provider/__tests__/style.test.tsx on lines 1033..1042
    components/config-provider/__tests__/style.test.tsx on lines 1044..1053
    components/config-provider/__tests__/style.test.tsx on lines 1055..1064

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

    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

      it('Should Avatar className & style works', () => {
        const { container } = render(
          <ConfigProvider avatar={{ className: 'cp-avatar', style: { backgroundColor: 'blue' } }}>
            <Avatar />
          </ConfigProvider>,
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 8 other locations - About 4 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 381..392
    components/config-provider/__tests__/style.test.tsx on lines 768..777
    components/config-provider/__tests__/style.test.tsx on lines 797..806
    components/config-provider/__tests__/style.test.tsx on lines 887..898
    components/config-provider/__tests__/style.test.tsx on lines 918..929
    components/config-provider/__tests__/style.test.tsx on lines 1033..1042
    components/config-provider/__tests__/style.test.tsx on lines 1044..1053
    components/config-provider/__tests__/style.test.tsx on lines 1487..1498

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

    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

      it('Should Rate className & style works', () => {
        const { container } = render(
          <ConfigProvider rate={{ className: 'cp-rate', style: { backgroundColor: 'blue' } }}>
            <Rate />
          </ConfigProvider>,
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 8 other locations - About 4 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 381..392
    components/config-provider/__tests__/style.test.tsx on lines 768..777
    components/config-provider/__tests__/style.test.tsx on lines 797..806
    components/config-provider/__tests__/style.test.tsx on lines 887..898
    components/config-provider/__tests__/style.test.tsx on lines 918..929
    components/config-provider/__tests__/style.test.tsx on lines 1044..1053
    components/config-provider/__tests__/style.test.tsx on lines 1055..1064
    components/config-provider/__tests__/style.test.tsx on lines 1487..1498

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

    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

      it('Should Breadcrumb className & style works', () => {
        const { container } = render(
          <ConfigProvider
            breadcrumb={{ className: 'cp-breadcrumb', style: { backgroundColor: 'red' } }}
          >
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 8 other locations - About 4 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 381..392
    components/config-provider/__tests__/style.test.tsx on lines 768..777
    components/config-provider/__tests__/style.test.tsx on lines 797..806
    components/config-provider/__tests__/style.test.tsx on lines 918..929
    components/config-provider/__tests__/style.test.tsx on lines 1033..1042
    components/config-provider/__tests__/style.test.tsx on lines 1044..1053
    components/config-provider/__tests__/style.test.tsx on lines 1055..1064
    components/config-provider/__tests__/style.test.tsx on lines 1487..1498

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

    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

      it('Should Spin className & style works', () => {
        const { container } = render(
          <ConfigProvider
            spin={{ className: 'config-provider-spin', style: { backgroundColor: 'red' } }}
          >
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 8 other locations - About 4 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 768..777
    components/config-provider/__tests__/style.test.tsx on lines 797..806
    components/config-provider/__tests__/style.test.tsx on lines 887..898
    components/config-provider/__tests__/style.test.tsx on lines 918..929
    components/config-provider/__tests__/style.test.tsx on lines 1033..1042
    components/config-provider/__tests__/style.test.tsx on lines 1044..1053
    components/config-provider/__tests__/style.test.tsx on lines 1055..1064
    components/config-provider/__tests__/style.test.tsx on lines 1487..1498

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

    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

      it('Should Slider className & style works', () => {
        const { container } = render(
          <ConfigProvider slider={{ className: 'cp-slider', style: { backgroundColor: 'red' } }}>
            <Slider />
          </ConfigProvider>,
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 8 other locations - About 4 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 381..392
    components/config-provider/__tests__/style.test.tsx on lines 768..777
    components/config-provider/__tests__/style.test.tsx on lines 887..898
    components/config-provider/__tests__/style.test.tsx on lines 918..929
    components/config-provider/__tests__/style.test.tsx on lines 1033..1042
    components/config-provider/__tests__/style.test.tsx on lines 1044..1053
    components/config-provider/__tests__/style.test.tsx on lines 1055..1064
    components/config-provider/__tests__/style.test.tsx on lines 1487..1498

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

    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

      it('Should Switch className & style works', () => {
        const { container } = render(
          <ConfigProvider switch={{ className: 'cp-switch', style: { backgroundColor: 'blue' } }}>
            <Switch />
          </ConfigProvider>,
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 8 other locations - About 4 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 381..392
    components/config-provider/__tests__/style.test.tsx on lines 768..777
    components/config-provider/__tests__/style.test.tsx on lines 797..806
    components/config-provider/__tests__/style.test.tsx on lines 887..898
    components/config-provider/__tests__/style.test.tsx on lines 918..929
    components/config-provider/__tests__/style.test.tsx on lines 1033..1042
    components/config-provider/__tests__/style.test.tsx on lines 1055..1064
    components/config-provider/__tests__/style.test.tsx on lines 1487..1498

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

    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

      it('Should Result className & style works', () => {
        const { container } = render(
          <ConfigProvider result={{ className: 'cp-result', style: { backgroundColor: 'red' } }}>
            <Result />
          </ConfigProvider>,
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 8 other locations - About 4 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 381..392
    components/config-provider/__tests__/style.test.tsx on lines 797..806
    components/config-provider/__tests__/style.test.tsx on lines 887..898
    components/config-provider/__tests__/style.test.tsx on lines 918..929
    components/config-provider/__tests__/style.test.tsx on lines 1033..1042
    components/config-provider/__tests__/style.test.tsx on lines 1044..1053
    components/config-provider/__tests__/style.test.tsx on lines 1055..1064
    components/config-provider/__tests__/style.test.tsx on lines 1487..1498

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

    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('Should Radio className & style works', () => {
        const { container } = render(
          <ConfigProvider
            radio={{
              className: 'cp-className',
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 4 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 900..916

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

    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('Should Checkbox className & style works', () => {
        const { container } = render(
          <ConfigProvider
            checkbox={{
              className: 'cp-checkbox',
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 4 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 779..795

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

    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('Should Space classNames works', () => {
        const { container } = render(
          <ConfigProvider
            space={{
              classNames: {
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 4 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 116..132

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

    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('Should Space style works', () => {
        const { container } = render(
          <ConfigProvider
            space={{
              style: {
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 4 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 62..78

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

    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('Should List className works', () => {
        const listData = [
          {
            title: 'Test Title',
          },
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 3 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 1355..1373

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

    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('Should Timeline className works', () => {
        const items = [
          {
            children: 'test item',
          },
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 3 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 629..646

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

    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

          <ConfigProvider
            textArea={{
              className: 'cp-textArea',
              style: { backgroundColor: 'yellow' },
              classNames: {
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 3 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 503..531

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

    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

          <ConfigProvider
            input={{
              className: 'cp-input',
              style: { backgroundColor: 'red' },
              classNames: {
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 3 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 554..583

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

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

        const options = [
          {
            value: 'zhejiang',
            label: 'Zhejiang',
            children: [
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 5 other locations - About 3 hrs to fix
    components/cascader/__tests__/index.test.tsx on lines 39..72
    components/cascader/__tests__/index.test.tsx on lines 255..288
    components/cascader/__tests__/index.test.tsx on lines 430..463
    components/input/demo/align.tsx on lines 24..57
    components/input/demo/group.tsx on lines 18..51

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

    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

      it('Should Progress style works', () => {
        const { container } = render(
          <ConfigProvider
            progress={{
              style: { color: 'red' },
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 4 other locations - About 3 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 367..379
    components/config-provider/__tests__/style.test.tsx on lines 1177..1191
    components/config-provider/__tests__/style.test.tsx on lines 1253..1265
    components/config-provider/__tests__/style.test.tsx on lines 1514..1526

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

    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

      it('Should Skeleton style works', () => {
        const { container } = render(
          <ConfigProvider
            skeleton={{
              style: { color: 'red' },
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 4 other locations - About 3 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 945..957
    components/config-provider/__tests__/style.test.tsx on lines 1177..1191
    components/config-provider/__tests__/style.test.tsx on lines 1253..1265
    components/config-provider/__tests__/style.test.tsx on lines 1514..1526

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

    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

      it('Should DatePicker style works', () => {
        const { container } = render(
          <ConfigProvider
            datePicker={{
              style: { color: 'red' },
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 4 other locations - About 3 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 367..379
    components/config-provider/__tests__/style.test.tsx on lines 945..957
    components/config-provider/__tests__/style.test.tsx on lines 1177..1191
    components/config-provider/__tests__/style.test.tsx on lines 1253..1265

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

    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

      it('Should TimePicker style works', () => {
        const { container } = render(
          <ConfigProvider
            timePicker={{
              style: { color: 'red' },
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 4 other locations - About 3 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 367..379
    components/config-provider/__tests__/style.test.tsx on lines 945..957
    components/config-provider/__tests__/style.test.tsx on lines 1177..1191
    components/config-provider/__tests__/style.test.tsx on lines 1514..1526

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

    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

      it('Should Calendar style works', () => {
        const { container } = render(
          <ConfigProvider
            calendar={{
              style: { color: 'red' },
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 4 other locations - About 3 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 367..379
    components/config-provider/__tests__/style.test.tsx on lines 945..957
    components/config-provider/__tests__/style.test.tsx on lines 1253..1265
    components/config-provider/__tests__/style.test.tsx on lines 1514..1526

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

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

      it('Should Progress className works', () => {
        const { container } = render(
          <ConfigProvider
            progress={{
              className: 'test-class',
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 5 other locations - About 2 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 134..145
    components/config-provider/__tests__/style.test.tsx on lines 353..365
    components/config-provider/__tests__/style.test.tsx on lines 1163..1175
    components/config-provider/__tests__/style.test.tsx on lines 1239..1251
    components/config-provider/__tests__/style.test.tsx on lines 1500..1512

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

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

      it('Should DatePicker className works', () => {
        const { container } = render(
          <ConfigProvider
            datePicker={{
              className: 'test-class',
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 5 other locations - About 2 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 134..145
    components/config-provider/__tests__/style.test.tsx on lines 353..365
    components/config-provider/__tests__/style.test.tsx on lines 931..943
    components/config-provider/__tests__/style.test.tsx on lines 1163..1175
    components/config-provider/__tests__/style.test.tsx on lines 1239..1251

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

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

      it('Should Skeleton className works', () => {
        const { container } = render(
          <ConfigProvider
            skeleton={{
              className: 'test-class',
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 5 other locations - About 2 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 134..145
    components/config-provider/__tests__/style.test.tsx on lines 931..943
    components/config-provider/__tests__/style.test.tsx on lines 1163..1175
    components/config-provider/__tests__/style.test.tsx on lines 1239..1251
    components/config-provider/__tests__/style.test.tsx on lines 1500..1512

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

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

      it('Should TimePicker className works', () => {
        const { container } = render(
          <ConfigProvider
            timePicker={{
              className: 'test-class',
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 5 other locations - About 2 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 134..145
    components/config-provider/__tests__/style.test.tsx on lines 353..365
    components/config-provider/__tests__/style.test.tsx on lines 931..943
    components/config-provider/__tests__/style.test.tsx on lines 1163..1175
    components/config-provider/__tests__/style.test.tsx on lines 1500..1512

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

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

      it('Should Divider className works', () => {
        const { container } = render(
          <ConfigProvider
            divider={{
              className: 'config-provider-className',
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 5 other locations - About 2 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 353..365
    components/config-provider/__tests__/style.test.tsx on lines 931..943
    components/config-provider/__tests__/style.test.tsx on lines 1163..1175
    components/config-provider/__tests__/style.test.tsx on lines 1239..1251
    components/config-provider/__tests__/style.test.tsx on lines 1500..1512

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

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

      it('Should Calendar className works', () => {
        const { container } = render(
          <ConfigProvider
            calendar={{
              className: 'test-class',
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 5 other locations - About 2 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 134..145
    components/config-provider/__tests__/style.test.tsx on lines 353..365
    components/config-provider/__tests__/style.test.tsx on lines 931..943
    components/config-provider/__tests__/style.test.tsx on lines 1239..1251
    components/config-provider/__tests__/style.test.tsx on lines 1500..1512

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

    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 { container } = render(
          <ConfigProvider
            tag={{
              closeIcon: true,
            }}
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 2 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 1112..1121

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

    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 { container } = render(
          <ConfigProvider
            tag={{
              closeIcon: false,
            }}
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 2 hrs to fix
    components/config-provider/__tests__/style.test.tsx on lines 1127..1136

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

    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

            <Form name="basic">
              <Form.Item label="Username" name="username">
                <Input />
              </Form.Item>
            </Form>
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 1 hr to fix
    components/form/__tests__/index.test.tsx on lines 295..299

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

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

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

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

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

    Refactorings

    Further Reading

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

            <Carousel style={{ fontSize: '16px' }}>
              <div>
                <h3>test item 1</h3>
              </div>
              <div>
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 2 other locations - About 55 mins to fix
    components/config-provider/__tests__/components.test.tsx on lines 207..214
    components/typography/demo/paragraph-debug.tsx on lines 78..86

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

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

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

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

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

    Refactorings

    Further Reading

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

          <ConfigProvider
            tag={{
              className: 'cp-tag',
              style: { backgroundColor: 'blue' },
              closeIcon: <span className="cp-test-closeIcon">cp-test-closeIcon</span>,
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 2 other locations - About 45 mins to fix
    components/config-provider/__tests__/style.test.tsx on lines 751..759
    components/config-provider/__tests__/style.test.tsx on lines 1331..1342

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

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

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

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

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

    Refactorings

    Further Reading

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

            <ConfigProvider
              notification={{
                className: 'cp-notification',
                style: { color: 'blue' },
                closeIcon: <span className="cp-test-icon">cp-test-icon</span>,
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 2 other locations - About 45 mins to fix
    components/config-provider/__tests__/style.test.tsx on lines 751..759
    components/config-provider/__tests__/style.test.tsx on lines 1068..1077

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

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

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

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

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

    Refactorings

    Further Reading

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

          <ConfigProvider
            modal={{
              className: 'cp-modal',
              style: { background: 'red' },
              closeIcon: <span className="cp-test-closeIcon">cp-test-closeIcon</span>,
    Severity: Major
    Found in components/config-provider/__tests__/style.test.tsx and 2 other locations - About 45 mins to fix
    components/config-provider/__tests__/style.test.tsx on lines 1068..1077
    components/config-provider/__tests__/style.test.tsx on lines 1331..1342

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

    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

          <ConfigProvider
            drawer={{
              closable: {
                closeIcon: <span className="cp-test-close-icon">close</span>,
                'aria-label': 'Close Btn',
    Severity: Minor
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 30 mins to fix
    components/config-provider/__tests__/style.test.tsx on lines 1091..1101

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 45.

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

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

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

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

    Refactorings

    Further Reading

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

          <ConfigProvider
            tag={{
              closable: {
                closeIcon: <span className="cp-test-closeIcon">cp-test-closeIcon</span>,
                'aria-label': 'Close Tag',
    Severity: Minor
    Found in components/config-provider/__tests__/style.test.tsx and 1 other location - About 30 mins to fix
    components/config-provider/__tests__/style.test.tsx on lines 182..191

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 45.

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

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

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

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

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status