ant-design/ant-design

View on GitHub
components/table/__tests__/Table.sorter.test.tsx

Summary

Maintainability
F
1 wk
Test Coverage

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

/* eslint-disable react/no-multi-comp */
import React from 'react';

import type { ColumnType, TableProps } from '..';
import Table from '..';
Severity: Major
Found in components/table/__tests__/Table.sorter.test.tsx - About 2 days to fix

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

        const columns: TableProps<any>['columns'] = [
          {
            title: 'Name',
            dataIndex: 'name',
          },
    Severity: Major
    Found in components/table/__tests__/Table.sorter.test.tsx and 1 other location - About 5 hrs to fix
    components/table/demo/multiple-sorter.tsx on lines 13..42

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

    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 TableTest: React.FC = () => {
          const [pagination, setPagination] = React.useState<TablePaginationConfig>({});
          const onChange: TableProps<any>['onChange'] = (pag) => {
            setPagination(pag);
          };
    Severity: Major
    Found in components/table/__tests__/Table.sorter.test.tsx and 2 other locations - About 4 hrs to fix
    components/table/__tests__/Table.sorter.test.tsx on lines 596..609
    components/table/__tests__/Table.sorter.test.tsx on lines 719..732

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

    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 TableTest: React.FC = () => {
          const [pagination, setPagination] = React.useState<TablePaginationConfig>({});
          const onChange: TableProps<any>['onChange'] = (pag) => {
            setPagination(pag);
          };
    Severity: Major
    Found in components/table/__tests__/Table.sorter.test.tsx and 2 other locations - About 4 hrs to fix
    components/table/__tests__/Table.sorter.test.tsx on lines 658..671
    components/table/__tests__/Table.sorter.test.tsx on lines 719..732

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

    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 TableTest: React.FC = () => {
          const [pagination, setPagination] = React.useState<TablePaginationConfig>({});
          const onChange: TableProps<any>['onChange'] = (pag) => {
            setPagination(pag);
          };
    Severity: Major
    Found in components/table/__tests__/Table.sorter.test.tsx and 2 other locations - About 4 hrs to fix
    components/table/__tests__/Table.sorter.test.tsx on lines 596..609
    components/table/__tests__/Table.sorter.test.tsx on lines 658..671

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

    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 tableData = [
          {
            key: '1',
            name: 'John Brown',
            chinese: 98,
    Severity: Major
    Found in components/table/__tests__/Table.sorter.test.tsx and 1 other location - About 3 hrs to fix
    components/table/demo/multiple-sorter.tsx on lines 44..73

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 111.

    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

      function renderedNames(container: ReturnType<typeof render>['container']) {
        const namesList: (Node['textContent'] | undefined)[] = [];
        container
          ?.querySelector('.ant-table-tbody')
          ?.querySelectorAll('tr')
    Severity: Major
    Found in components/table/__tests__/Table.sorter.test.tsx and 1 other location - About 2 hrs to fix
    components/table/__tests__/Table.filter.test.tsx on lines 66..75

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

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

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

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

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

    Refactorings

    Further Reading

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

        const testData = [
          { key: 0, name: 'Jack', age: 11 },
          { key: 1, name: 'Lucy', age: 20 },
          { key: 2, name: 'Tom', age: 21 },
          { key: 3, name: 'Jerry', age: 22 },
    Severity: Major
    Found in components/table/__tests__/Table.sorter.test.tsx and 7 other locations - About 2 hrs to fix
    components/table/__tests__/Table.filter.test.tsx on lines 879..884
    components/table/__tests__/Table.filter.test.tsx on lines 2849..2854
    components/table/__tests__/Table.sorter.test.tsx on lines 518..523
    components/table/__tests__/Table.sorter.test.tsx on lines 535..540
    components/table/__tests__/Table.sorter.test.tsx on lines 555..560
    components/table/__tests__/Table.sorter.test.tsx on lines 642..647
    components/table/__tests__/Table.sorter.test.tsx on lines 703..708

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 76.

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

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

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

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

    Refactorings

    Further Reading

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

        const testData = [
          { key: 0, name: 'Jack', age: 11 },
          { key: 1, name: 'Lucy', age: 20 },
          { key: 2, name: 'Tom', age: 21 },
          { key: 3, name: 'Jerry', age: 22 },
    Severity: Major
    Found in components/table/__tests__/Table.sorter.test.tsx and 7 other locations - About 2 hrs to fix
    components/table/__tests__/Table.filter.test.tsx on lines 879..884
    components/table/__tests__/Table.filter.test.tsx on lines 2849..2854
    components/table/__tests__/Table.sorter.test.tsx on lines 518..523
    components/table/__tests__/Table.sorter.test.tsx on lines 535..540
    components/table/__tests__/Table.sorter.test.tsx on lines 555..560
    components/table/__tests__/Table.sorter.test.tsx on lines 589..594
    components/table/__tests__/Table.sorter.test.tsx on lines 703..708

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 76.

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

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

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

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

    Refactorings

    Further Reading

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

        const testData = [
          { key: 0, name: 'Jack', age: 11 },
          { key: 1, name: 'Lucy', age: 20 },
          { key: 2, name: 'Tom', age: 21 },
          { key: 3, name: 'Jerry', age: 22 },
    Severity: Major
    Found in components/table/__tests__/Table.sorter.test.tsx and 7 other locations - About 2 hrs to fix
    components/table/__tests__/Table.filter.test.tsx on lines 879..884
    components/table/__tests__/Table.filter.test.tsx on lines 2849..2854
    components/table/__tests__/Table.sorter.test.tsx on lines 535..540
    components/table/__tests__/Table.sorter.test.tsx on lines 555..560
    components/table/__tests__/Table.sorter.test.tsx on lines 589..594
    components/table/__tests__/Table.sorter.test.tsx on lines 642..647
    components/table/__tests__/Table.sorter.test.tsx on lines 703..708

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 76.

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

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

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

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

    Refactorings

    Further Reading

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

        const testData = [
          { key: 0, name: 'Jack', age: 11 },
          { key: 1, name: 'Lucy', age: 20 },
          { key: 2, name: 'Tom', age: 21 },
          { key: 3, name: 'Jerry', age: 22 },
    Severity: Major
    Found in components/table/__tests__/Table.sorter.test.tsx and 7 other locations - About 2 hrs to fix
    components/table/__tests__/Table.filter.test.tsx on lines 879..884
    components/table/__tests__/Table.filter.test.tsx on lines 2849..2854
    components/table/__tests__/Table.sorter.test.tsx on lines 518..523
    components/table/__tests__/Table.sorter.test.tsx on lines 535..540
    components/table/__tests__/Table.sorter.test.tsx on lines 555..560
    components/table/__tests__/Table.sorter.test.tsx on lines 589..594
    components/table/__tests__/Table.sorter.test.tsx on lines 642..647

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 76.

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

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

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

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

    Refactorings

    Further Reading

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

        const testData = [
          { key: 0, name: 'Jack', age: 11 },
          { key: 1, name: 'Lucy', age: 20 },
          { key: 2, name: 'Tom', age: 21 },
          { key: 3, name: 'Jerry', age: 22 },
    Severity: Major
    Found in components/table/__tests__/Table.sorter.test.tsx and 7 other locations - About 2 hrs to fix
    components/table/__tests__/Table.filter.test.tsx on lines 879..884
    components/table/__tests__/Table.filter.test.tsx on lines 2849..2854
    components/table/__tests__/Table.sorter.test.tsx on lines 518..523
    components/table/__tests__/Table.sorter.test.tsx on lines 555..560
    components/table/__tests__/Table.sorter.test.tsx on lines 589..594
    components/table/__tests__/Table.sorter.test.tsx on lines 642..647
    components/table/__tests__/Table.sorter.test.tsx on lines 703..708

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 76.

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

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

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

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

    Refactorings

    Further Reading

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

        const testData = [
          { key: 0, name: 'Jack', age: 11 },
          { key: 1, name: 'Lucy', age: 20 },
          { key: 2, name: 'Tom', age: 21 },
          { key: 3, name: 'Jerry', age: 22 },
    Severity: Major
    Found in components/table/__tests__/Table.sorter.test.tsx and 7 other locations - About 2 hrs to fix
    components/table/__tests__/Table.filter.test.tsx on lines 879..884
    components/table/__tests__/Table.filter.test.tsx on lines 2849..2854
    components/table/__tests__/Table.sorter.test.tsx on lines 518..523
    components/table/__tests__/Table.sorter.test.tsx on lines 535..540
    components/table/__tests__/Table.sorter.test.tsx on lines 589..594
    components/table/__tests__/Table.sorter.test.tsx on lines 642..647
    components/table/__tests__/Table.sorter.test.tsx on lines 703..708

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 76.

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

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

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

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

    Refactorings

    Further Reading

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

            <Table.Column
              title="Math Score"
              dataIndex="math"
              sorter={{
                compare: (a: any, b: any) => a.math - b.math,
    Severity: Major
    Found in components/table/__tests__/Table.sorter.test.tsx and 1 other location - About 1 hr to fix
    components/table/__tests__/Table.sorter.test.tsx on lines 976..983

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

    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

            <Table.Column
              title="Chinese Score"
              dataIndex="chinese"
              sorter={{
                compare: (a: any, b: any) => a.chinese - b.chinese,
    Severity: Major
    Found in components/table/__tests__/Table.sorter.test.tsx and 1 other location - About 1 hr to fix
    components/table/__tests__/Table.sorter.test.tsx on lines 984..991

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

    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

      const data = [
        { key: 0, name: 'Jack' },
        { key: 1, name: 'Lucy' },
        { key: 2, name: 'Tom' },
        { key: 3, name: 'Jerry' },
    Severity: Major
    Found in components/table/__tests__/Table.sorter.test.tsx and 4 other locations - About 1 hr to fix
    components/table/__tests__/Table.filter.test.tsx on lines 50..55
    components/table/__tests__/Table.order.test.tsx on lines 29..34
    components/table/__tests__/Table.pagination.test.tsx on lines 20..25
    components/table/__tests__/Table.rowSelection.test.tsx on lines 31..36

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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 2 locations. Consider refactoring.
    Open

        rerender(
          createTable({
            showSorterTooltip: { target: 'sorter-icon' },
            columns: [{ ...column, showSorterTooltip: { target: 'full-header' } }],
          }),
    Severity: Minor
    Found in components/table/__tests__/Table.sorter.test.tsx and 1 other location - About 35 mins to fix
    components/table/__tests__/Table.sorter.test.tsx on lines 370..375

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

    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

        rerender(
          createTable({
            showSorterTooltip: { target: 'full-header' },
            columns: [{ ...column, showSorterTooltip: { target: 'sorter-icon' } }],
          }),
    Severity: Minor
    Found in components/table/__tests__/Table.sorter.test.tsx and 1 other location - About 35 mins to fix
    components/table/__tests__/Table.sorter.test.tsx on lines 353..358

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

    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

        expect(
          container
            ?.querySelectorAll('.ant-table-column-sorter-full')?.[1]
            ?.querySelector('.ant-table-column-sorter-down')
            ?.className.includes('active'),
    Severity: Minor
    Found in components/table/__tests__/Table.sorter.test.tsx and 1 other location - About 35 mins to fix
    components/table/__tests__/Table.sorter.test.tsx on lines 1049..1054

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

    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

        expect(
          container
            ?.querySelectorAll('.ant-table-column-sorter-full')?.[0]
            ?.querySelector('.ant-table-column-sorter-up')
            ?.className.includes('active'),
    Severity: Minor
    Found in components/table/__tests__/Table.sorter.test.tsx and 1 other location - About 35 mins to fix
    components/table/__tests__/Table.sorter.test.tsx on lines 1055..1060

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

    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