fbredius/storybook

View on GitHub
lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx

Summary

Maintainability
D
2 days
Test Coverage

File ArgRow.stories.tsx has 318 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import { action } from '@storybook/addon-actions';
import { ArgRow } from './ArgRow';
import { TableWrapper } from './ArgsTable';
import { ResetWrapper } from '../../typography/ResetWrapper';
Severity: Minor
Found in lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx - About 3 hrs to fix

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

    String.args = {
      ...baseArgs,
      row: {
        key: 'someString',
        name: 'Some String',
    Severity: Major
    Found in lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx and 1 other location - About 2 hrs to fix
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 62..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 86.

    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

    Boolean.args = {
      ...baseArgs,
      row: {
        key: 'someBoolean',
        name: 'Some Boolean',
    Severity: Major
    Found in lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx and 1 other location - About 2 hrs to fix
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 28..41

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

    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

    ObjectOf.args = {
      ...baseArgs,
      row: {
        key: 'someObject',
        name: 'Some Object',
    Severity: Major
    Found in lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx and 1 other location - About 2 hrs to fix
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 199..211

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

    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

    ArrayOf.args = {
      ...baseArgs,
      row: {
        key: 'someArray',
        name: 'Some Array',
    Severity: Major
    Found in lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx and 1 other location - About 2 hrs to fix
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 184..196

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

    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

    export default {
      component: ArgRow,
      title: 'Docs/ArgRow',
      decorators: [
        (getStory) => (
    Severity: Major
    Found in lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx and 1 other location - About 1 hr to fix
    lib/components/src/blocks/ArgsTable/SectionRow.stories.tsx on lines 6..18

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

    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

    Enum.args = {
      ...baseArgs,
      row: {
        key: 'enum',
        name: 'Some enum',
    Severity: Major
    Found in lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx and 2 other locations - About 1 hr to fix
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 287..299
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 305..317

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

    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

    LongEnum.args = {
      ...baseArgs,
      row: {
        key: 'longEnum',
        name: 'Long enum',
    Severity: Major
    Found in lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx and 2 other locations - About 1 hr to fix
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 269..281
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 305..317

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

    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

    ComplexUnion.args = {
      ...baseArgs,
      row: {
        key: 'complexUnion',
        name: 'Complex',
    Severity: Major
    Found in lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx and 2 other locations - About 1 hr to fix
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 269..281
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 287..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 59.

    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

    Select.args = {
      ...baseArgs,
      row: {
        ...Radio.args.row,
        control: { ...Radio.args.row.control, type: 'select' },
    Severity: Major
    Found in lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx and 4 other locations - About 1 hr to fix
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 139..145
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 148..154
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 157..163
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 175..181

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

    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

    MultiSelect.args = {
      ...baseArgs,
      row: {
        ...Radio.args.row,
        control: { ...Radio.args.row.control, type: 'multi-select' },
    Severity: Major
    Found in lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx and 4 other locations - About 1 hr to fix
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 139..145
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 148..154
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 157..163
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 166..172

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

    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

    InlineCheck.args = {
      ...baseArgs,
      row: {
        ...Radio.args.row,
        control: { ...Radio.args.row.control, type: 'inline-check' },
    Severity: Major
    Found in lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx and 4 other locations - About 1 hr to fix
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 139..145
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 148..154
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 166..172
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 175..181

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

    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

    InlineRadio.args = {
      ...baseArgs,
      row: {
        ...Radio.args.row,
        control: { ...Radio.args.row.control, type: 'inline-radio' },
    Severity: Major
    Found in lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx and 4 other locations - About 1 hr to fix
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 148..154
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 157..163
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 166..172
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 175..181

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

    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

    Check.args = {
      ...baseArgs,
      row: {
        ...Radio.args.row,
        control: { ...Radio.args.row.control, type: 'check' },
    Severity: Major
    Found in lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx and 4 other locations - About 1 hr to fix
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 139..145
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 157..163
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 166..172
    lib/components/src/blocks/ArgsTable/ArgRow.stories.tsx on lines 175..181

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

    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