ujh/fountainpencompanion

View on GitHub

Showing 401 of 401 total issues

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

    {
      inked_on: "2023-01-15",
      archived_on: null,
      comment: "",
      last_used_on: "2023-02-04",
app/javascript/src/currently_inked/cards/CurrentlyInkedCards.spec.jsx on lines 19..32
app/javascript/src/currently_inked/table/CurrentlyInkedTable.spec.jsx on lines 32..45

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

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

    {
      inked_on: "2023-01-15",
      archived_on: null,
      comment: "",
      last_used_on: "2023-02-04",
app/javascript/src/currently_inked/cards/CurrentlyInkedCards.spec.jsx on lines 19..32
app/javascript/src/currently_inked/table/CurrentlyInkedTable.spec.jsx on lines 18..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 68.

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

    {
      inked_on: "2023-01-15",
      archived_on: null,
      comment: "",
      last_used_on: "2023-02-04",
app/javascript/src/currently_inked/table/CurrentlyInkedTable.spec.jsx on lines 18..31
app/javascript/src/currently_inked/table/CurrentlyInkedTable.spec.jsx on lines 32..45

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

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

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

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

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

Refactorings

Further Reading

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

document.addEventListener("DOMContentLoaded", () => {
  const el = document.getElementById("bot-signups-graph");
  if (el) {
    const root = createRoot(el);
    root.render(<BotSignUps />);
Severity: Major
Found in app/javascript/src/admin/graphs/index.jsx and 7 other locations - About 1 hr to fix
app/javascript/src/admin/graphs/index.jsx on lines 11..17
app/javascript/src/admin/graphs/index.jsx on lines 27..33
app/javascript/src/admin/graphs/index.jsx on lines 35..41
app/javascript/src/admin/graphs/index.jsx on lines 43..49
app/javascript/src/admin/graphs/index.jsx on lines 51..57
app/javascript/src/dashboard/index.jsx on lines 12..18
app/javascript/src/public_inks/index.jsx on lines 5..11

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

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

document.addEventListener("DOMContentLoaded", () => {
  const el = document.getElementById("collected-inks-graph");
  if (el) {
    const root = createRoot(el);
    root.render(<CollectedInks />);
Severity: Major
Found in app/javascript/src/admin/graphs/index.jsx and 7 other locations - About 1 hr to fix
app/javascript/src/admin/graphs/index.jsx on lines 11..17
app/javascript/src/admin/graphs/index.jsx on lines 19..25
app/javascript/src/admin/graphs/index.jsx on lines 35..41
app/javascript/src/admin/graphs/index.jsx on lines 43..49
app/javascript/src/admin/graphs/index.jsx on lines 51..57
app/javascript/src/dashboard/index.jsx on lines 12..18
app/javascript/src/public_inks/index.jsx on lines 5..11

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

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

document.addEventListener("DOMContentLoaded", () => {
  const el = document.getElementById("currently-inked-graph");
  if (el) {
    const root = createRoot(el);
    root.render(<CurrentlyInked />);
Severity: Major
Found in app/javascript/src/admin/graphs/index.jsx and 7 other locations - About 1 hr to fix
app/javascript/src/admin/graphs/index.jsx on lines 11..17
app/javascript/src/admin/graphs/index.jsx on lines 19..25
app/javascript/src/admin/graphs/index.jsx on lines 27..33
app/javascript/src/admin/graphs/index.jsx on lines 35..41
app/javascript/src/admin/graphs/index.jsx on lines 51..57
app/javascript/src/dashboard/index.jsx on lines 12..18
app/javascript/src/public_inks/index.jsx on lines 5..11

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

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

document.addEventListener("DOMContentLoaded", () => {
  const el = document.getElementById("collected-pens-graph");
  if (el) {
    const root = createRoot(el);
    root.render(<CollectedPens />);
Severity: Major
Found in app/javascript/src/admin/graphs/index.jsx and 7 other locations - About 1 hr to fix
app/javascript/src/admin/graphs/index.jsx on lines 11..17
app/javascript/src/admin/graphs/index.jsx on lines 19..25
app/javascript/src/admin/graphs/index.jsx on lines 27..33
app/javascript/src/admin/graphs/index.jsx on lines 43..49
app/javascript/src/admin/graphs/index.jsx on lines 51..57
app/javascript/src/dashboard/index.jsx on lines 12..18
app/javascript/src/public_inks/index.jsx on lines 5..11

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

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

document.addEventListener("DOMContentLoaded", () => {
  const el = document.getElementById("signups-graph");
  if (el) {
    const root = createRoot(el);
    root.render(<SignUps />);
Severity: Major
Found in app/javascript/src/admin/graphs/index.jsx and 7 other locations - About 1 hr to fix
app/javascript/src/admin/graphs/index.jsx on lines 19..25
app/javascript/src/admin/graphs/index.jsx on lines 27..33
app/javascript/src/admin/graphs/index.jsx on lines 35..41
app/javascript/src/admin/graphs/index.jsx on lines 43..49
app/javascript/src/admin/graphs/index.jsx on lines 51..57
app/javascript/src/dashboard/index.jsx on lines 12..18
app/javascript/src/public_inks/index.jsx on lines 5..11

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

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

  putRequest(`/admins/micro_clusters/${microClusterId}.json`, {
    data: {
      id: microClusterId,
      type: "micro_cluster",
      attributes: { macro_cluster_id: macroClusterId }
Severity: Major
Found in app/javascript/src/admin/micro-clusters/assignCluster.jsx and 2 other locations - About 1 hr to fix
app/javascript/src/admin/pens-micro-clusters/microClusters.js on lines 56..76
app/javascript/src/admin/pens-model-micro-clusters/microClusters.js on lines 56..78

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

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

document.addEventListener("DOMContentLoaded", () => {
  const el = document.getElementById("usage-records-graph");
  if (el) {
    const root = createRoot(el);
    root.render(<UsageRecords />);
Severity: Major
Found in app/javascript/src/admin/graphs/index.jsx and 7 other locations - About 1 hr to fix
app/javascript/src/admin/graphs/index.jsx on lines 11..17
app/javascript/src/admin/graphs/index.jsx on lines 19..25
app/javascript/src/admin/graphs/index.jsx on lines 27..33
app/javascript/src/admin/graphs/index.jsx on lines 35..41
app/javascript/src/admin/graphs/index.jsx on lines 43..49
app/javascript/src/dashboard/index.jsx on lines 12..18
app/javascript/src/public_inks/index.jsx on lines 5..11

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

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

document.addEventListener("DOMContentLoaded", () => {
  const el = document.getElementById("new-public-inks");
  if (el) {
    const root = createRoot(el);
    root.render(<App />);
Severity: Major
Found in app/javascript/src/public_inks/index.jsx and 7 other locations - About 1 hr to fix
app/javascript/src/admin/graphs/index.jsx on lines 11..17
app/javascript/src/admin/graphs/index.jsx on lines 19..25
app/javascript/src/admin/graphs/index.jsx on lines 27..33
app/javascript/src/admin/graphs/index.jsx on lines 35..41
app/javascript/src/admin/graphs/index.jsx on lines 43..49
app/javascript/src/admin/graphs/index.jsx on lines 51..57
app/javascript/src/dashboard/index.jsx on lines 12..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

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

document.addEventListener("DOMContentLoaded", () => {
  const el = document.getElementById("dashboard");
  if (el) {
    const root = createRoot(el);
    root.render(<Dashboard />);
Severity: Major
Found in app/javascript/src/dashboard/index.jsx and 7 other locations - About 1 hr to fix
app/javascript/src/admin/graphs/index.jsx on lines 11..17
app/javascript/src/admin/graphs/index.jsx on lines 19..25
app/javascript/src/admin/graphs/index.jsx on lines 27..33
app/javascript/src/admin/graphs/index.jsx on lines 35..41
app/javascript/src/admin/graphs/index.jsx on lines 43..49
app/javascript/src/admin/graphs/index.jsx on lines 51..57
app/javascript/src/public_inks/index.jsx on lines 5..11

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

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

  putRequest(`/admins/pens/model_micro_clusters/${microClusterId}.json`, {
    data: {
      id: microClusterId,
      type: "pens_model_micro_cluster",
      attributes: { pens_model_id: macroClusterId }
app/javascript/src/admin/micro-clusters/assignCluster.jsx on lines 5..24
app/javascript/src/admin/pens-micro-clusters/microClusters.js on lines 56..76

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

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

  putRequest(`/admins/pens/micro_clusters/${microClusterId}.json`, {
    data: {
      id: microClusterId,
      type: "pens_micro_cluster",
      attributes: { pens_model_variant_id: macroClusterId }
app/javascript/src/admin/micro-clusters/assignCluster.jsx on lines 5..24
app/javascript/src/admin/pens-model-micro-clusters/microClusters.js on lines 56..78

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

Function InksSummaryWidgetContent has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const InksSummaryWidgetContent = () => {
  const { data } = useContext(WidgetDataContext);
  const { count, used, swabbed, archived } = data.attributes;
  return (
    <>
Severity: Minor
Found in app/javascript/src/dashboard/inks_summary_widget.jsx - About 1 hr to fix

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

        expect(fuzzyMatch(input, null, "amber")).toStrictEqual([
          {
            values: {
              brand: "Pilot",
              model: "Custom 823",
    Severity: Major
    Found in app/javascript/src/collected_pens/table/match.spec.js and 1 other location - About 1 hr to fix
    app/javascript/src/collected_pens/table/match.spec.js on lines 92..104

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

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

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

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

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

    Refactorings

    Further Reading

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

        expect(fuzzyMatch(input, null, "3776")).toStrictEqual([
          {
            values: {
              brand: "Platinum",
              model: "#3776 Century",
    Severity: Major
    Found in app/javascript/src/collected_pens/table/match.spec.js and 1 other location - About 1 hr to fix
    app/javascript/src/collected_pens/table/match.spec.js on lines 78..90

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

    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 { getByTitle, getByLabelText, queryByText, user } = setup(
          <CollectedInksTable
            archive={false}
            data={data}
            onLayoutChange={() => {
    app/javascript/src/collected_inks/cards/CollectedInksCards.spec.jsx on lines 69..77

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

    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 { getByTitle, getByLabelText, queryByTestId, user } = setup(
          <CollectedInksCards
            archive={false}
            data={data}
            onLayoutChange={() => {
    app/javascript/src/collected_inks/table/CollectedInksTable.spec.jsx on lines 94..102

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

    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

    Method index has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def index
        if current_user.collected_inks.empty?
          flash.now[
            :notice
          ] = "Your ink collection is empty. Check out the <a href='/pages/guide'>documentation</a> on how to add some.".html_safe
    Severity: Minor
    Found in app/controllers/collected_inks_controller.rb - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language