ujh/fountainpencompanion

View on GitHub
app/javascript/src/collected_pens/components/Actions.jsx

Summary

Maintainability
D
2 days
Test Coverage

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

        <div className="m-2 d-flex">
          <div className="search" style={{ minWidth: "205px" }}>
            <input
              className="form-control"
              type="text"
Severity: Major
Found in app/javascript/src/collected_pens/components/Actions.jsx and 1 other location - About 6 hrs to fix
app/javascript/src/currently_inked/components/Actions.jsx on lines 110..128

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

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

        <>
          <a className="btn btn-sm btn-link" href="/collected_pens/import">
            Import
          </a>
          <a className="btn btn-sm btn-link" href="/collected_pens.csv">
Severity: Major
Found in app/javascript/src/collected_pens/components/Actions.jsx and 1 other location - About 2 hrs to fix
app/javascript/src/collected_inks/components/Actions.jsx on lines 156..169

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

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

          <button
            type="button"
            title="Configure visible fields"
            className="btn btn-sm btn-outline-secondary dropdown-toggle"
            data-bs-toggle="dropdown"
Severity: Major
Found in app/javascript/src/collected_pens/components/Actions.jsx and 2 other locations - About 1 hr to fix
app/javascript/src/collected_inks/components/Actions.jsx on lines 45..54
app/javascript/src/currently_inked/components/Actions.jsx on lines 43..52

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

  const debouncedOnFilterChange = useCallback(
    _.debounce(
      (value) => {
        onFilterChange(value);
      },
Severity: Minor
Found in app/javascript/src/collected_pens/components/Actions.jsx and 1 other location - About 55 mins to fix
app/javascript/src/currently_inked/components/Actions.jsx on lines 23..31

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

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

              <Switch
                checked={isSwitchedOn("comment")}
                onChange={(e) => onSwitchChange(e.target.checked, "comment")}
              >
                Show&nbsp;comment
Severity: Major
Found in app/javascript/src/collected_pens/components/Actions.jsx and 28 other locations - About 35 mins to fix
app/javascript/src/collected_inks/components/Actions.jsx on lines 57..62
app/javascript/src/collected_inks/components/Actions.jsx on lines 63..68
app/javascript/src/collected_inks/components/Actions.jsx on lines 69..74
app/javascript/src/collected_inks/components/Actions.jsx on lines 75..80
app/javascript/src/collected_inks/components/Actions.jsx on lines 81..86
app/javascript/src/collected_inks/components/Actions.jsx on lines 87..92
app/javascript/src/collected_inks/components/Actions.jsx on lines 93..100
app/javascript/src/collected_inks/components/Actions.jsx on lines 101..108
app/javascript/src/collected_inks/components/Actions.jsx on lines 109..114
app/javascript/src/collected_inks/components/Actions.jsx on lines 115..120
app/javascript/src/collected_inks/components/Actions.jsx on lines 121..128
app/javascript/src/collected_inks/components/Actions.jsx on lines 129..134
app/javascript/src/collected_inks/components/Actions.jsx on lines 135..142
app/javascript/src/collected_pens/components/Actions.jsx on lines 55..60
app/javascript/src/collected_pens/components/Actions.jsx on lines 61..66
app/javascript/src/collected_pens/components/Actions.jsx on lines 67..72
app/javascript/src/collected_pens/components/Actions.jsx on lines 73..78
app/javascript/src/collected_pens/components/Actions.jsx on lines 79..86
app/javascript/src/collected_pens/components/Actions.jsx on lines 87..92
app/javascript/src/collected_pens/components/Actions.jsx on lines 99..104
app/javascript/src/collected_pens/components/Actions.jsx on lines 105..112
app/javascript/src/collected_pens/components/Actions.jsx on lines 113..120
app/javascript/src/collected_pens/components/Actions.jsx on lines 121..126
app/javascript/src/currently_inked/components/Actions.jsx on lines 55..60
app/javascript/src/currently_inked/components/Actions.jsx on lines 61..66
app/javascript/src/currently_inked/components/Actions.jsx on lines 67..72
app/javascript/src/currently_inked/components/Actions.jsx on lines 73..80
app/javascript/src/currently_inked/components/Actions.jsx on lines 81..88

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

              <Switch
                checked={isSwitchedOn("last_used_on")}
                onChange={(e) =>
                  onSwitchChange(e.target.checked, "last_used_on")
                }
Severity: Major
Found in app/javascript/src/collected_pens/components/Actions.jsx and 28 other locations - About 35 mins to fix
app/javascript/src/collected_inks/components/Actions.jsx on lines 57..62
app/javascript/src/collected_inks/components/Actions.jsx on lines 63..68
app/javascript/src/collected_inks/components/Actions.jsx on lines 69..74
app/javascript/src/collected_inks/components/Actions.jsx on lines 75..80
app/javascript/src/collected_inks/components/Actions.jsx on lines 81..86
app/javascript/src/collected_inks/components/Actions.jsx on lines 87..92
app/javascript/src/collected_inks/components/Actions.jsx on lines 93..100
app/javascript/src/collected_inks/components/Actions.jsx on lines 101..108
app/javascript/src/collected_inks/components/Actions.jsx on lines 109..114
app/javascript/src/collected_inks/components/Actions.jsx on lines 115..120
app/javascript/src/collected_inks/components/Actions.jsx on lines 121..128
app/javascript/src/collected_inks/components/Actions.jsx on lines 129..134
app/javascript/src/collected_inks/components/Actions.jsx on lines 135..142
app/javascript/src/collected_pens/components/Actions.jsx on lines 55..60
app/javascript/src/collected_pens/components/Actions.jsx on lines 61..66
app/javascript/src/collected_pens/components/Actions.jsx on lines 67..72
app/javascript/src/collected_pens/components/Actions.jsx on lines 73..78
app/javascript/src/collected_pens/components/Actions.jsx on lines 79..86
app/javascript/src/collected_pens/components/Actions.jsx on lines 87..92
app/javascript/src/collected_pens/components/Actions.jsx on lines 93..98
app/javascript/src/collected_pens/components/Actions.jsx on lines 99..104
app/javascript/src/collected_pens/components/Actions.jsx on lines 105..112
app/javascript/src/collected_pens/components/Actions.jsx on lines 121..126
app/javascript/src/currently_inked/components/Actions.jsx on lines 55..60
app/javascript/src/currently_inked/components/Actions.jsx on lines 61..66
app/javascript/src/currently_inked/components/Actions.jsx on lines 67..72
app/javascript/src/currently_inked/components/Actions.jsx on lines 73..80
app/javascript/src/currently_inked/components/Actions.jsx on lines 81..88

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

              <Switch
                checked={isSwitchedOn("color")}
                onChange={(e) => onSwitchChange(e.target.checked, "color")}
              >
                Show&nbsp;color
Severity: Major
Found in app/javascript/src/collected_pens/components/Actions.jsx and 28 other locations - About 35 mins to fix
app/javascript/src/collected_inks/components/Actions.jsx on lines 57..62
app/javascript/src/collected_inks/components/Actions.jsx on lines 63..68
app/javascript/src/collected_inks/components/Actions.jsx on lines 69..74
app/javascript/src/collected_inks/components/Actions.jsx on lines 75..80
app/javascript/src/collected_inks/components/Actions.jsx on lines 81..86
app/javascript/src/collected_inks/components/Actions.jsx on lines 87..92
app/javascript/src/collected_inks/components/Actions.jsx on lines 93..100
app/javascript/src/collected_inks/components/Actions.jsx on lines 101..108
app/javascript/src/collected_inks/components/Actions.jsx on lines 109..114
app/javascript/src/collected_inks/components/Actions.jsx on lines 115..120
app/javascript/src/collected_inks/components/Actions.jsx on lines 121..128
app/javascript/src/collected_inks/components/Actions.jsx on lines 129..134
app/javascript/src/collected_inks/components/Actions.jsx on lines 135..142
app/javascript/src/collected_pens/components/Actions.jsx on lines 55..60
app/javascript/src/collected_pens/components/Actions.jsx on lines 67..72
app/javascript/src/collected_pens/components/Actions.jsx on lines 73..78
app/javascript/src/collected_pens/components/Actions.jsx on lines 79..86
app/javascript/src/collected_pens/components/Actions.jsx on lines 87..92
app/javascript/src/collected_pens/components/Actions.jsx on lines 93..98
app/javascript/src/collected_pens/components/Actions.jsx on lines 99..104
app/javascript/src/collected_pens/components/Actions.jsx on lines 105..112
app/javascript/src/collected_pens/components/Actions.jsx on lines 113..120
app/javascript/src/collected_pens/components/Actions.jsx on lines 121..126
app/javascript/src/currently_inked/components/Actions.jsx on lines 55..60
app/javascript/src/currently_inked/components/Actions.jsx on lines 61..66
app/javascript/src/currently_inked/components/Actions.jsx on lines 67..72
app/javascript/src/currently_inked/components/Actions.jsx on lines 73..80
app/javascript/src/currently_inked/components/Actions.jsx on lines 81..88

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

              <Switch
                checked={isSwitchedOn("trim_color")}
                onChange={(e) => onSwitchChange(e.target.checked, "trim_color")}
              >
                Show&nbsp;trim&nbsp;color
Severity: Major
Found in app/javascript/src/collected_pens/components/Actions.jsx and 28 other locations - About 35 mins to fix
app/javascript/src/collected_inks/components/Actions.jsx on lines 57..62
app/javascript/src/collected_inks/components/Actions.jsx on lines 63..68
app/javascript/src/collected_inks/components/Actions.jsx on lines 69..74
app/javascript/src/collected_inks/components/Actions.jsx on lines 75..80
app/javascript/src/collected_inks/components/Actions.jsx on lines 81..86
app/javascript/src/collected_inks/components/Actions.jsx on lines 87..92
app/javascript/src/collected_inks/components/Actions.jsx on lines 93..100
app/javascript/src/collected_inks/components/Actions.jsx on lines 101..108
app/javascript/src/collected_inks/components/Actions.jsx on lines 109..114
app/javascript/src/collected_inks/components/Actions.jsx on lines 115..120
app/javascript/src/collected_inks/components/Actions.jsx on lines 121..128
app/javascript/src/collected_inks/components/Actions.jsx on lines 129..134
app/javascript/src/collected_inks/components/Actions.jsx on lines 135..142
app/javascript/src/collected_pens/components/Actions.jsx on lines 55..60
app/javascript/src/collected_pens/components/Actions.jsx on lines 61..66
app/javascript/src/collected_pens/components/Actions.jsx on lines 67..72
app/javascript/src/collected_pens/components/Actions.jsx on lines 79..86
app/javascript/src/collected_pens/components/Actions.jsx on lines 87..92
app/javascript/src/collected_pens/components/Actions.jsx on lines 93..98
app/javascript/src/collected_pens/components/Actions.jsx on lines 99..104
app/javascript/src/collected_pens/components/Actions.jsx on lines 105..112
app/javascript/src/collected_pens/components/Actions.jsx on lines 113..120
app/javascript/src/collected_pens/components/Actions.jsx on lines 121..126
app/javascript/src/currently_inked/components/Actions.jsx on lines 55..60
app/javascript/src/currently_inked/components/Actions.jsx on lines 61..66
app/javascript/src/currently_inked/components/Actions.jsx on lines 67..72
app/javascript/src/currently_inked/components/Actions.jsx on lines 73..80
app/javascript/src/currently_inked/components/Actions.jsx on lines 81..88

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

              <Switch
                checked={isSwitchedOn("usage")}
                onChange={(e) => onSwitchChange(e.target.checked, "usage")}
              >
                Show&nbsp;usage
Severity: Major
Found in app/javascript/src/collected_pens/components/Actions.jsx and 28 other locations - About 35 mins to fix
app/javascript/src/collected_inks/components/Actions.jsx on lines 57..62
app/javascript/src/collected_inks/components/Actions.jsx on lines 63..68
app/javascript/src/collected_inks/components/Actions.jsx on lines 69..74
app/javascript/src/collected_inks/components/Actions.jsx on lines 75..80
app/javascript/src/collected_inks/components/Actions.jsx on lines 81..86
app/javascript/src/collected_inks/components/Actions.jsx on lines 87..92
app/javascript/src/collected_inks/components/Actions.jsx on lines 93..100
app/javascript/src/collected_inks/components/Actions.jsx on lines 101..108
app/javascript/src/collected_inks/components/Actions.jsx on lines 109..114
app/javascript/src/collected_inks/components/Actions.jsx on lines 115..120
app/javascript/src/collected_inks/components/Actions.jsx on lines 121..128
app/javascript/src/collected_inks/components/Actions.jsx on lines 129..134
app/javascript/src/collected_inks/components/Actions.jsx on lines 135..142
app/javascript/src/collected_pens/components/Actions.jsx on lines 55..60
app/javascript/src/collected_pens/components/Actions.jsx on lines 61..66
app/javascript/src/collected_pens/components/Actions.jsx on lines 67..72
app/javascript/src/collected_pens/components/Actions.jsx on lines 73..78
app/javascript/src/collected_pens/components/Actions.jsx on lines 79..86
app/javascript/src/collected_pens/components/Actions.jsx on lines 87..92
app/javascript/src/collected_pens/components/Actions.jsx on lines 93..98
app/javascript/src/collected_pens/components/Actions.jsx on lines 105..112
app/javascript/src/collected_pens/components/Actions.jsx on lines 113..120
app/javascript/src/collected_pens/components/Actions.jsx on lines 121..126
app/javascript/src/currently_inked/components/Actions.jsx on lines 55..60
app/javascript/src/currently_inked/components/Actions.jsx on lines 61..66
app/javascript/src/currently_inked/components/Actions.jsx on lines 67..72
app/javascript/src/currently_inked/components/Actions.jsx on lines 73..80
app/javascript/src/currently_inked/components/Actions.jsx on lines 81..88

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

              <Switch
                checked={isSwitchedOn("material")}
                onChange={(e) => onSwitchChange(e.target.checked, "material")}
              >
                Show&nbsp;material
Severity: Major
Found in app/javascript/src/collected_pens/components/Actions.jsx and 28 other locations - About 35 mins to fix
app/javascript/src/collected_inks/components/Actions.jsx on lines 57..62
app/javascript/src/collected_inks/components/Actions.jsx on lines 63..68
app/javascript/src/collected_inks/components/Actions.jsx on lines 69..74
app/javascript/src/collected_inks/components/Actions.jsx on lines 75..80
app/javascript/src/collected_inks/components/Actions.jsx on lines 81..86
app/javascript/src/collected_inks/components/Actions.jsx on lines 87..92
app/javascript/src/collected_inks/components/Actions.jsx on lines 93..100
app/javascript/src/collected_inks/components/Actions.jsx on lines 101..108
app/javascript/src/collected_inks/components/Actions.jsx on lines 109..114
app/javascript/src/collected_inks/components/Actions.jsx on lines 115..120
app/javascript/src/collected_inks/components/Actions.jsx on lines 121..128
app/javascript/src/collected_inks/components/Actions.jsx on lines 129..134
app/javascript/src/collected_inks/components/Actions.jsx on lines 135..142
app/javascript/src/collected_pens/components/Actions.jsx on lines 55..60
app/javascript/src/collected_pens/components/Actions.jsx on lines 61..66
app/javascript/src/collected_pens/components/Actions.jsx on lines 73..78
app/javascript/src/collected_pens/components/Actions.jsx on lines 79..86
app/javascript/src/collected_pens/components/Actions.jsx on lines 87..92
app/javascript/src/collected_pens/components/Actions.jsx on lines 93..98
app/javascript/src/collected_pens/components/Actions.jsx on lines 99..104
app/javascript/src/collected_pens/components/Actions.jsx on lines 105..112
app/javascript/src/collected_pens/components/Actions.jsx on lines 113..120
app/javascript/src/collected_pens/components/Actions.jsx on lines 121..126
app/javascript/src/currently_inked/components/Actions.jsx on lines 55..60
app/javascript/src/currently_inked/components/Actions.jsx on lines 61..66
app/javascript/src/currently_inked/components/Actions.jsx on lines 67..72
app/javascript/src/currently_inked/components/Actions.jsx on lines 73..80
app/javascript/src/currently_inked/components/Actions.jsx on lines 81..88

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

              <Switch
                checked={isSwitchedOn("daily_usage")}
                onChange={(e) =>
                  onSwitchChange(e.target.checked, "daily_usage")
                }
Severity: Major
Found in app/javascript/src/collected_pens/components/Actions.jsx and 28 other locations - About 35 mins to fix
app/javascript/src/collected_inks/components/Actions.jsx on lines 57..62
app/javascript/src/collected_inks/components/Actions.jsx on lines 63..68
app/javascript/src/collected_inks/components/Actions.jsx on lines 69..74
app/javascript/src/collected_inks/components/Actions.jsx on lines 75..80
app/javascript/src/collected_inks/components/Actions.jsx on lines 81..86
app/javascript/src/collected_inks/components/Actions.jsx on lines 87..92
app/javascript/src/collected_inks/components/Actions.jsx on lines 93..100
app/javascript/src/collected_inks/components/Actions.jsx on lines 101..108
app/javascript/src/collected_inks/components/Actions.jsx on lines 109..114
app/javascript/src/collected_inks/components/Actions.jsx on lines 115..120
app/javascript/src/collected_inks/components/Actions.jsx on lines 121..128
app/javascript/src/collected_inks/components/Actions.jsx on lines 129..134
app/javascript/src/collected_inks/components/Actions.jsx on lines 135..142
app/javascript/src/collected_pens/components/Actions.jsx on lines 55..60
app/javascript/src/collected_pens/components/Actions.jsx on lines 61..66
app/javascript/src/collected_pens/components/Actions.jsx on lines 67..72
app/javascript/src/collected_pens/components/Actions.jsx on lines 73..78
app/javascript/src/collected_pens/components/Actions.jsx on lines 79..86
app/javascript/src/collected_pens/components/Actions.jsx on lines 87..92
app/javascript/src/collected_pens/components/Actions.jsx on lines 93..98
app/javascript/src/collected_pens/components/Actions.jsx on lines 99..104
app/javascript/src/collected_pens/components/Actions.jsx on lines 113..120
app/javascript/src/collected_pens/components/Actions.jsx on lines 121..126
app/javascript/src/currently_inked/components/Actions.jsx on lines 55..60
app/javascript/src/currently_inked/components/Actions.jsx on lines 61..66
app/javascript/src/currently_inked/components/Actions.jsx on lines 67..72
app/javascript/src/currently_inked/components/Actions.jsx on lines 73..80
app/javascript/src/currently_inked/components/Actions.jsx on lines 81..88

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

              <Switch
                checked={isSwitchedOn("created_at")}
                onChange={(e) => onSwitchChange(e.target.checked, "created_at")}
              >
                Show&nbsp;Added&nbsp;On
Severity: Major
Found in app/javascript/src/collected_pens/components/Actions.jsx and 28 other locations - About 35 mins to fix
app/javascript/src/collected_inks/components/Actions.jsx on lines 57..62
app/javascript/src/collected_inks/components/Actions.jsx on lines 63..68
app/javascript/src/collected_inks/components/Actions.jsx on lines 69..74
app/javascript/src/collected_inks/components/Actions.jsx on lines 75..80
app/javascript/src/collected_inks/components/Actions.jsx on lines 81..86
app/javascript/src/collected_inks/components/Actions.jsx on lines 87..92
app/javascript/src/collected_inks/components/Actions.jsx on lines 93..100
app/javascript/src/collected_inks/components/Actions.jsx on lines 101..108
app/javascript/src/collected_inks/components/Actions.jsx on lines 109..114
app/javascript/src/collected_inks/components/Actions.jsx on lines 115..120
app/javascript/src/collected_inks/components/Actions.jsx on lines 121..128
app/javascript/src/collected_inks/components/Actions.jsx on lines 129..134
app/javascript/src/collected_inks/components/Actions.jsx on lines 135..142
app/javascript/src/collected_pens/components/Actions.jsx on lines 55..60
app/javascript/src/collected_pens/components/Actions.jsx on lines 61..66
app/javascript/src/collected_pens/components/Actions.jsx on lines 67..72
app/javascript/src/collected_pens/components/Actions.jsx on lines 73..78
app/javascript/src/collected_pens/components/Actions.jsx on lines 79..86
app/javascript/src/collected_pens/components/Actions.jsx on lines 87..92
app/javascript/src/collected_pens/components/Actions.jsx on lines 93..98
app/javascript/src/collected_pens/components/Actions.jsx on lines 99..104
app/javascript/src/collected_pens/components/Actions.jsx on lines 105..112
app/javascript/src/collected_pens/components/Actions.jsx on lines 113..120
app/javascript/src/currently_inked/components/Actions.jsx on lines 55..60
app/javascript/src/currently_inked/components/Actions.jsx on lines 61..66
app/javascript/src/currently_inked/components/Actions.jsx on lines 67..72
app/javascript/src/currently_inked/components/Actions.jsx on lines 73..80
app/javascript/src/currently_inked/components/Actions.jsx on lines 81..88

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

              <Switch
                checked={isSwitchedOn("filling_system")}
                onChange={(e) =>
                  onSwitchChange(e.target.checked, "filling_system")
                }
Severity: Major
Found in app/javascript/src/collected_pens/components/Actions.jsx and 28 other locations - About 35 mins to fix
app/javascript/src/collected_inks/components/Actions.jsx on lines 57..62
app/javascript/src/collected_inks/components/Actions.jsx on lines 63..68
app/javascript/src/collected_inks/components/Actions.jsx on lines 69..74
app/javascript/src/collected_inks/components/Actions.jsx on lines 75..80
app/javascript/src/collected_inks/components/Actions.jsx on lines 81..86
app/javascript/src/collected_inks/components/Actions.jsx on lines 87..92
app/javascript/src/collected_inks/components/Actions.jsx on lines 93..100
app/javascript/src/collected_inks/components/Actions.jsx on lines 101..108
app/javascript/src/collected_inks/components/Actions.jsx on lines 109..114
app/javascript/src/collected_inks/components/Actions.jsx on lines 115..120
app/javascript/src/collected_inks/components/Actions.jsx on lines 121..128
app/javascript/src/collected_inks/components/Actions.jsx on lines 129..134
app/javascript/src/collected_inks/components/Actions.jsx on lines 135..142
app/javascript/src/collected_pens/components/Actions.jsx on lines 55..60
app/javascript/src/collected_pens/components/Actions.jsx on lines 61..66
app/javascript/src/collected_pens/components/Actions.jsx on lines 67..72
app/javascript/src/collected_pens/components/Actions.jsx on lines 73..78
app/javascript/src/collected_pens/components/Actions.jsx on lines 87..92
app/javascript/src/collected_pens/components/Actions.jsx on lines 93..98
app/javascript/src/collected_pens/components/Actions.jsx on lines 99..104
app/javascript/src/collected_pens/components/Actions.jsx on lines 105..112
app/javascript/src/collected_pens/components/Actions.jsx on lines 113..120
app/javascript/src/collected_pens/components/Actions.jsx on lines 121..126
app/javascript/src/currently_inked/components/Actions.jsx on lines 55..60
app/javascript/src/currently_inked/components/Actions.jsx on lines 61..66
app/javascript/src/currently_inked/components/Actions.jsx on lines 67..72
app/javascript/src/currently_inked/components/Actions.jsx on lines 73..80
app/javascript/src/currently_inked/components/Actions.jsx on lines 81..88

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

              <Switch
                checked={isSwitchedOn("price")}
                onChange={(e) => onSwitchChange(e.target.checked, "price")}
              >
                Show&nbsp;price
Severity: Major
Found in app/javascript/src/collected_pens/components/Actions.jsx and 28 other locations - About 35 mins to fix
app/javascript/src/collected_inks/components/Actions.jsx on lines 57..62
app/javascript/src/collected_inks/components/Actions.jsx on lines 63..68
app/javascript/src/collected_inks/components/Actions.jsx on lines 69..74
app/javascript/src/collected_inks/components/Actions.jsx on lines 75..80
app/javascript/src/collected_inks/components/Actions.jsx on lines 81..86
app/javascript/src/collected_inks/components/Actions.jsx on lines 87..92
app/javascript/src/collected_inks/components/Actions.jsx on lines 93..100
app/javascript/src/collected_inks/components/Actions.jsx on lines 101..108
app/javascript/src/collected_inks/components/Actions.jsx on lines 109..114
app/javascript/src/collected_inks/components/Actions.jsx on lines 115..120
app/javascript/src/collected_inks/components/Actions.jsx on lines 121..128
app/javascript/src/collected_inks/components/Actions.jsx on lines 129..134
app/javascript/src/collected_inks/components/Actions.jsx on lines 135..142
app/javascript/src/collected_pens/components/Actions.jsx on lines 55..60
app/javascript/src/collected_pens/components/Actions.jsx on lines 61..66
app/javascript/src/collected_pens/components/Actions.jsx on lines 67..72
app/javascript/src/collected_pens/components/Actions.jsx on lines 73..78
app/javascript/src/collected_pens/components/Actions.jsx on lines 79..86
app/javascript/src/collected_pens/components/Actions.jsx on lines 93..98
app/javascript/src/collected_pens/components/Actions.jsx on lines 99..104
app/javascript/src/collected_pens/components/Actions.jsx on lines 105..112
app/javascript/src/collected_pens/components/Actions.jsx on lines 113..120
app/javascript/src/collected_pens/components/Actions.jsx on lines 121..126
app/javascript/src/currently_inked/components/Actions.jsx on lines 55..60
app/javascript/src/currently_inked/components/Actions.jsx on lines 61..66
app/javascript/src/currently_inked/components/Actions.jsx on lines 67..72
app/javascript/src/currently_inked/components/Actions.jsx on lines 73..80
app/javascript/src/currently_inked/components/Actions.jsx on lines 81..88

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

              <Switch
                checked={isSwitchedOn("nib")}
                onChange={(e) => onSwitchChange(e.target.checked, "nib")}
              >
                Show&nbsp;nib
Severity: Major
Found in app/javascript/src/collected_pens/components/Actions.jsx and 28 other locations - About 35 mins to fix
app/javascript/src/collected_inks/components/Actions.jsx on lines 57..62
app/javascript/src/collected_inks/components/Actions.jsx on lines 63..68
app/javascript/src/collected_inks/components/Actions.jsx on lines 69..74
app/javascript/src/collected_inks/components/Actions.jsx on lines 75..80
app/javascript/src/collected_inks/components/Actions.jsx on lines 81..86
app/javascript/src/collected_inks/components/Actions.jsx on lines 87..92
app/javascript/src/collected_inks/components/Actions.jsx on lines 93..100
app/javascript/src/collected_inks/components/Actions.jsx on lines 101..108
app/javascript/src/collected_inks/components/Actions.jsx on lines 109..114
app/javascript/src/collected_inks/components/Actions.jsx on lines 115..120
app/javascript/src/collected_inks/components/Actions.jsx on lines 121..128
app/javascript/src/collected_inks/components/Actions.jsx on lines 129..134
app/javascript/src/collected_inks/components/Actions.jsx on lines 135..142
app/javascript/src/collected_pens/components/Actions.jsx on lines 61..66
app/javascript/src/collected_pens/components/Actions.jsx on lines 67..72
app/javascript/src/collected_pens/components/Actions.jsx on lines 73..78
app/javascript/src/collected_pens/components/Actions.jsx on lines 79..86
app/javascript/src/collected_pens/components/Actions.jsx on lines 87..92
app/javascript/src/collected_pens/components/Actions.jsx on lines 93..98
app/javascript/src/collected_pens/components/Actions.jsx on lines 99..104
app/javascript/src/collected_pens/components/Actions.jsx on lines 105..112
app/javascript/src/collected_pens/components/Actions.jsx on lines 113..120
app/javascript/src/collected_pens/components/Actions.jsx on lines 121..126
app/javascript/src/currently_inked/components/Actions.jsx on lines 55..60
app/javascript/src/currently_inked/components/Actions.jsx on lines 61..66
app/javascript/src/currently_inked/components/Actions.jsx on lines 67..72
app/javascript/src/currently_inked/components/Actions.jsx on lines 73..80
app/javascript/src/currently_inked/components/Actions.jsx on lines 81..88

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

There are no issues that match your filters.

Category
Status