ujh/fountainpencompanion

View on GitHub

Showing 295 of 377 total issues

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

              relationships: {
                collected_ink: {
                  data: {
                    id: "35623",
                    type: "collected_ink"
Severity: Major
Found in app/javascript/src/currently_inked/CurrentlyInked.spec.jsx and 2 other locations - About 45 mins to fix
app/javascript/src/currently_inked/CurrentlyInked.spec.jsx on lines 37..50
app/javascript/src/currently_inked/CurrentlyInked.spec.jsx on lines 99..112

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

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

              relationships: {
                collected_ink: {
                  data: {
                    id: "18809",
                    type: "collected_ink"
Severity: Major
Found in app/javascript/src/currently_inked/CurrentlyInked.spec.jsx and 2 other locations - About 45 mins to fix
app/javascript/src/currently_inked/CurrentlyInked.spec.jsx on lines 68..81
app/javascript/src/currently_inked/CurrentlyInked.spec.jsx on lines 99..112

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

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

              relationships: {
                collected_ink: {
                  data: {
                    id: "18809",
                    type: "collected_ink"
Severity: Major
Found in app/javascript/src/currently_inked/CurrentlyInked.spec.jsx and 2 other locations - About 45 mins to fix
app/javascript/src/currently_inked/CurrentlyInked.spec.jsx on lines 37..50
app/javascript/src/currently_inked/CurrentlyInked.spec.jsx on lines 68..81

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

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

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

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

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

Refactorings

Further Reading

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

function fixedEncodeURIComponent(str) {
  return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
    return "%" + c.charCodeAt(0).toString(16);
  });
}
Severity: Minor
Found in app/javascript/src/collected_inks/table/CollectedInksTable.jsx and 1 other location - About 40 mins to fix
app/javascript/src/collected_inks/cards/SwabCard.jsx on lines 8..12

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

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

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

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

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

Refactorings

Further Reading

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

function fixedEncodeURIComponent(str) {
  return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
    return "%" + c.charCodeAt(0).toString(16);
  });
}
Severity: Minor
Found in app/javascript/src/collected_inks/cards/SwabCard.jsx and 1 other location - About 40 mins to fix
app/javascript/src/collected_inks/table/CollectedInksTable.jsx on lines 16..20

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

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

      microCluster.macro_cluster.micro_clusters.forEach((mc) => {
        mc.entries = mc.collected_pens;
        delete mc.collected_pens;
      });
Severity: Minor
Found in app/javascript/src/admin/pens-micro-clusters/microClusters.js and 1 other location - About 40 mins to fix
app/javascript/src/admin/micro-clusters/assignCluster.jsx on lines 18..21

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

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

      microCluster.macro_cluster.micro_clusters.forEach((mc) => {
        mc.entries = mc.collected_inks;
        delete mc.collected_inks;
      });
Severity: Minor
Found in app/javascript/src/admin/micro-clusters/assignCluster.jsx and 1 other location - About 40 mins to fix
app/javascript/src/admin/pens-micro-clusters/microClusters.js on lines 71..74

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

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

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

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

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

Refactorings

Further Reading

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

    const { getAllByRole, user } = setup(
      <CollectedPensTable
        pens={pens}
        onLayoutChange={() => {
          return;
app/javascript/src/collected_pens/table/CollectedPensTable.spec.jsx on lines 119..126

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

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

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

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

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

Refactorings

Further Reading

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

    const { getAllByRole, user } = setup(
      <CollectedPensTable
        pens={pens}
        onLayoutChange={() => {
          return;
app/javascript/src/collected_pens/table/CollectedPensTable.spec.jsx on lines 93..100

Duplicated Code

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

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

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

Tuning

This issue has a mass of 48.

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

    def description
      description =
        document
          .at_css('meta[property="og:description"]')
          &.attribute("content")
Severity: Minor
Found in app/operations/unfurler/html.rb and 1 other location - About 35 mins to fix
app/operations/unfurler/html.rb on lines 15..23

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

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

    def url
      url =
        document.at_css('meta[property="og:url"]')&.attribute("content")&.value
      url ||=
        document.at_css('meta[itemprop="url"]')&.attribute("content")&.value
Severity: Minor
Found in app/operations/unfurler/html.rb and 1 other location - About 35 mins to fix
app/operations/unfurler/html.rb on lines 42..60

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

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("kind")}
                onChange={(e) => onSwitchChange(e.target.checked, "kind")}
              >
                Show&nbsp;type
Severity: Major
Found in app/javascript/src/collected_inks/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 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/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_inks/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 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/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("cluster_tags")}
                onChange={(e) =>
                  onSwitchChange(e.target.checked, "cluster_tags")
                }
Severity: Major
Found in app/javascript/src/collected_inks/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_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/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("used")}
                onChange={(e) => onSwitchChange(e.target.checked, "used")}
              >
                Show&nbsp;used
Severity: Major
Found in app/javascript/src/collected_inks/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 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/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_inks/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 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/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("private_comment")}
                onChange={(e) =>
                  onSwitchChange(e.target.checked, "private_comment")
                }
Severity: Major
Found in app/javascript/src/collected_inks/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 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/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/currently_inked/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/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

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("comment")}
                onChange={(e) => onSwitchChange(e.target.checked, "comment")}
              >
                Show&nbsp;comment
Severity: Major
Found in app/javascript/src/collected_inks/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 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/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

Severity
Category
Status
Source
Language