ifmeorg/ifme

View on GitHub
client/app/stories/Input.stories.jsx

Summary

Maintainability
A
0 mins
Test Coverage

File Input.stories.jsx has 467 lines of code (exceeds 250 allowed). Consider refactoring.
Wontfix

/* eslint-disable no-unused-vars */
/* eslint-disable max-len */
import React from 'react';
import { InputMocks } from 'mocks/InputMocks';

Severity: Minor
Found in client/app/stories/Input.stories.jsx - About 7 hrs to fix

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

    const SubmitTemplate = (args) => (
      <>
        {InputMocks.createInput(InputMocks.inputSubmitProps, {
          onClick: InputMocks.event,
          small: true,
    Severity: Major
    Found in client/app/stories/Input.stories.jsx and 1 other location - About 7 hrs to fix
    client/app/stories/Input.stories.jsx on lines 307..335

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

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

    const SelectTemplate = (args) => (
      <>
        {InputMocks.createInput(InputMocks.inputSelectProps, {
          onChange: InputMocks.event,
          small: true,
    Severity: Major
    Found in client/app/stories/Input.stories.jsx and 1 other location - About 7 hrs to fix
    client/app/stories/Input.stories.jsx on lines 196..224

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

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

    const InputTextTemplate = (args) => (
      <>
        {InputMocks.createInput(InputMocks.inputTextProps, {
          required: true,
          small: true,
    Severity: Major
    Found in client/app/stories/Input.stories.jsx and 1 other location - About 6 hrs to fix
    client/app/stories/Input.stories.jsx on lines 404..430

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

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

    const TagWithAccordionTemplate = (args) => (
      <>
        {InputMocks.createInput(InputMocks.inputTagProps, {
          small: true,
          accordion: true,
    Severity: Major
    Found in client/app/stories/Input.stories.jsx and 1 other location - About 6 hrs to fix
    client/app/stories/Input.stories.jsx on lines 10..38

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

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

    const InputTextareaTemplateWithAccordionTemplate = (args) => (
      <>
        {InputMocks.createInput(InputMocks.inputTextareaTemplateProps, {
          required: true,
          accordion: true,
    Severity: Major
    Found in client/app/stories/Input.stories.jsx and 2 other locations - About 3 hrs to fix
    client/app/stories/Input.stories.jsx on lines 109..132
    client/app/stories/Input.stories.jsx on lines 276..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 149.

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

    const CheckboxGroupWithAccordionTemplate = (args) => (
      <>
        {InputMocks.createInput(InputMocks.inputCheckboxGroupProps, {
          required: true,
          accordion: true,
    Severity: Major
    Found in client/app/stories/Input.stories.jsx and 2 other locations - About 3 hrs to fix
    client/app/stories/Input.stories.jsx on lines 109..132
    client/app/stories/Input.stories.jsx on lines 165..188

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

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

    const InputTextareaWithAccordionTemplate = (args) => (
      <>
        {InputMocks.createInput(InputMocks.inputTextareaProps, {
          required: true,
          accordion: true,
    Severity: Major
    Found in client/app/stories/Input.stories.jsx and 2 other locations - About 3 hrs to fix
    client/app/stories/Input.stories.jsx on lines 165..188
    client/app/stories/Input.stories.jsx on lines 276..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 149.

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

    const CheckboxGroupTemplate = (args) => (
      <>
        {InputMocks.createInput(InputMocks.inputCheckboxGroupProps, {
          required: true,
        })}
    Severity: Major
    Found in client/app/stories/Input.stories.jsx and 4 other locations - About 2 hrs to fix
    client/app/stories/Input.stories.jsx on lines 84..103
    client/app/stories/Input.stories.jsx on lines 140..159
    client/app/stories/Input.stories.jsx on lines 454..471
    client/app/stories/Input.stories.jsx on lines 494..513

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

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

    const MyInputTextareaTemplate = (args) => (
      <>
        {InputMocks.createInput(InputMocks.inputTextareaProps, {
          required: true,
        })}
    Severity: Major
    Found in client/app/stories/Input.stories.jsx and 4 other locations - About 2 hrs to fix
    client/app/stories/Input.stories.jsx on lines 140..159
    client/app/stories/Input.stories.jsx on lines 251..270
    client/app/stories/Input.stories.jsx on lines 454..471
    client/app/stories/Input.stories.jsx on lines 494..513

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

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

    const PasswordWithAccordionTemplate = (args) => (
      <>
        {InputMocks.createInput(InputMocks.inputPasswordProps, {
          accordion: true,
        })}
    Severity: Major
    Found in client/app/stories/Input.stories.jsx and 4 other locations - About 2 hrs to fix
    client/app/stories/Input.stories.jsx on lines 84..103
    client/app/stories/Input.stories.jsx on lines 140..159
    client/app/stories/Input.stories.jsx on lines 251..270
    client/app/stories/Input.stories.jsx on lines 454..471

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

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

    const InputTextareaTemplateTemplate = (args) => (
      <>
        {InputMocks.createInput(InputMocks.inputTextareaTemplateProps, {
          required: true,
        })}
    Severity: Major
    Found in client/app/stories/Input.stories.jsx and 4 other locations - About 2 hrs to fix
    client/app/stories/Input.stories.jsx on lines 84..103
    client/app/stories/Input.stories.jsx on lines 251..270
    client/app/stories/Input.stories.jsx on lines 454..471
    client/app/stories/Input.stories.jsx on lines 494..513

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

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

    const SwitchWithAccordionTemplate = (args) => (
      <>
        {InputMocks.createInput(InputMocks.inputSwitchProps, { accordion: true })}
        {InputMocks.createInput(InputMocks.inputSwitchProps, {
          large: true,
    Severity: Major
    Found in client/app/stories/Input.stories.jsx and 4 other locations - About 2 hrs to fix
    client/app/stories/Input.stories.jsx on lines 84..103
    client/app/stories/Input.stories.jsx on lines 140..159
    client/app/stories/Input.stories.jsx on lines 251..270
    client/app/stories/Input.stories.jsx on lines 494..513

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

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

    const SwitchTemplate = (args) => (
      <>
        {InputMocks.createInput(InputMocks.inputSwitchProps)}
        {InputMocks.createInput(InputMocks.inputSwitchProps, {
          large: true,
    Severity: Major
    Found in client/app/stories/Input.stories.jsx and 1 other location - About 1 hr to fix
    client/app/stories/Input.stories.jsx on lines 476..490

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

    const PasswordTemplate = (args) => (
      <>
        {InputMocks.createInput(InputMocks.inputPasswordProps)}
        {InputMocks.createInput(InputMocks.inputPasswordProps, {
          large: true,
    Severity: Major
    Found in client/app/stories/Input.stories.jsx and 1 other location - About 1 hr to fix
    client/app/stories/Input.stories.jsx on lines 436..450

    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

    There are no issues that match your filters.

    Category
    Status