ant-design/ant-design

View on GitHub

Showing 3,488 of 3,488 total issues

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

      <Form
        layout="inline"
        className="components-table-demo-control-bar"
        style={{ marginBottom: 16 }}
      >
Severity: Major
Found in components/table/demo/component-token.tsx and 1 other location - About 1 wk to fix
components/table/demo/dynamic-settings.tsx on lines 179..260

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

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

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

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

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

Refactorings

Further Reading

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

      <Form
        layout="inline"
        className="components-table-demo-control-bar"
        style={{ marginBottom: 16 }}
      >
Severity: Major
Found in components/table/demo/dynamic-settings.tsx and 1 other location - About 1 wk to fix
components/table/demo/component-token.tsx on lines 179..260

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

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

File Table.filter.test.tsx has 2604 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable no-unsafe-optional-chaining */
/* eslint-disable react/no-multi-comp */
import React, { useEffect, useState } from 'react';

import type { ColumnGroupType, ColumnType, TableProps } from '..';
Severity: Major
Found in components/table/__tests__/Table.filter.test.tsx - About 1 wk to fix

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

    import type { ChangeEventHandler } from 'react';
    import React, { version as ReactVersion, useEffect, useRef, useState } from 'react';
    import { AlertFilled } from '@ant-design/icons';
    import type { ColProps } from 'antd/es/grid';
    import classNames from 'classnames';
    Severity: Major
    Found in components/form/__tests__/index.test.tsx - About 5 days to fix

      File Table.rowSelection.test.tsx has 1535 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import React from 'react';
      
      import type { TableProps } from '..';
      import Table from '..';
      import { resetWarned } from '../../_util/warning';
      Severity: Major
      Found in components/table/__tests__/Table.rowSelection.test.tsx - About 4 days to fix

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

        import React from 'react';
        
        import type { UploadFile, UploadProps } from '..';
        import Upload from '..';
        import { act, fireEvent, render, waitFakeTimer, waitFor } from '../../../tests/utils';
        Severity: Major
        Found in components/upload/__tests__/uploadlist.test.tsx - About 3 days to fix

          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

                <Typography>
                  <Title>Introduction</Title>
                  <Paragraph>
                    In the process of internal desktop applications development, many different design specs and
                    implementations would be involved, which might cause designers and developers difficulties
            Severity: Major
            Found in components/typography/demo/componentToken-debug.tsx and 1 other location - About 3 days to fix
            components/typography/demo/basic.tsx on lines 10..100

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

            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

              <Typography>
                <Title>Introduction</Title>
            
                <Paragraph>
                  In the process of internal desktop applications development, many different design specs and
            Severity: Major
            Found in components/typography/demo/basic.tsx and 1 other location - About 3 days to fix
            components/typography/demo/componentToken-debug.tsx on lines 21..103

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

            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

            const localeValues: Locale = {
              locale: 'ja',
              Pagination,
              DatePicker,
              TimePicker,
            Severity: Major
            Found in components/locale/ja_JP.ts and 2 other locations - About 3 days to fix
            components/locale/en_US.ts on lines 11..147
            components/locale/id_ID.ts on lines 11..147

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

            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

            const localeValues: Locale = {
              locale: 'en',
              Pagination,
              DatePicker,
              TimePicker,
            Severity: Major
            Found in components/locale/en_US.ts and 2 other locations - About 3 days to fix
            components/locale/id_ID.ts on lines 11..147
            components/locale/ja_JP.ts on lines 11..147

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

            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

            const localeValues: Locale = {
              locale: 'id',
              Pagination,
              DatePicker,
              TimePicker,
            Severity: Major
            Found in components/locale/id_ID.ts and 2 other locations - About 3 days to fix
            components/locale/en_US.ts on lines 11..147
            components/locale/ja_JP.ts on lines 11..147

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

            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

            const localeValues: Locale = {
              locale: 'eu',
              Pagination,
              DatePicker,
              TimePicker,
            Severity: Major
            Found in components/locale/eu_ES.ts and 2 other locations - About 3 days to fix
            components/locale/ko_KR.ts on lines 11..144
            components/locale/lt_LT.ts on lines 11..144

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

            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

            const localeValues: Locale = {
              locale: 'lt',
              Pagination,
              DatePicker,
              TimePicker,
            Severity: Major
            Found in components/locale/lt_LT.ts and 2 other locations - About 3 days to fix
            components/locale/eu_ES.ts on lines 11..144
            components/locale/ko_KR.ts on lines 11..144

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

            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

            const localeValues: Locale = {
              locale: 'ko',
              Pagination,
              DatePicker,
              TimePicker,
            Severity: Major
            Found in components/locale/ko_KR.ts and 2 other locations - About 3 days to fix
            components/locale/eu_ES.ts on lines 11..144
            components/locale/lt_LT.ts on lines 11..144

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

            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 localeValues: Locale = {
              locale: 'fa',
              Pagination,
              DatePicker,
              TimePicker,
            Severity: Major
            Found in components/locale/fa_IR.ts and 5 other locations - About 3 days to fix
            components/locale/ru_RU.ts on lines 12..142
            components/locale/sv_SE.ts on lines 11..141
            components/locale/th_TH.ts on lines 11..141
            components/locale/uk_UA.ts on lines 11..141
            components/locale/vi_VN.ts on lines 10..140

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

            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 localeValues: Locale = {
              locale: 'ru',
              Pagination,
              DatePicker,
              TimePicker,
            Severity: Major
            Found in components/locale/ru_RU.ts and 5 other locations - About 3 days to fix
            components/locale/fa_IR.ts on lines 11..141
            components/locale/sv_SE.ts on lines 11..141
            components/locale/th_TH.ts on lines 11..141
            components/locale/uk_UA.ts on lines 11..141
            components/locale/vi_VN.ts on lines 10..140

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

            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 localeValues: Locale = {
              locale: 'th',
              Pagination,
              DatePicker,
              TimePicker,
            Severity: Major
            Found in components/locale/th_TH.ts and 5 other locations - About 3 days to fix
            components/locale/fa_IR.ts on lines 11..141
            components/locale/ru_RU.ts on lines 12..142
            components/locale/sv_SE.ts on lines 11..141
            components/locale/uk_UA.ts on lines 11..141
            components/locale/vi_VN.ts on lines 10..140

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

            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 localeValues: Locale = {
              locale: 'vi',
              Pagination,
              DatePicker,
              TimePicker,
            Severity: Major
            Found in components/locale/vi_VN.ts and 5 other locations - About 3 days to fix
            components/locale/fa_IR.ts on lines 11..141
            components/locale/ru_RU.ts on lines 12..142
            components/locale/sv_SE.ts on lines 11..141
            components/locale/th_TH.ts on lines 11..141
            components/locale/uk_UA.ts on lines 11..141

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

            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 localeValues: Locale = {
              locale: 'sv',
              Pagination,
              DatePicker,
              TimePicker,
            Severity: Major
            Found in components/locale/sv_SE.ts and 5 other locations - About 3 days to fix
            components/locale/fa_IR.ts on lines 11..141
            components/locale/ru_RU.ts on lines 12..142
            components/locale/th_TH.ts on lines 11..141
            components/locale/uk_UA.ts on lines 11..141
            components/locale/vi_VN.ts on lines 10..140

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

            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