ujh/fountainpencompanion

View on GitHub

Showing 401 of 401 total issues

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

    const { getByText } = render(
      <Counter
        data={{ bottle: 1, sample: 3, cartridge: 0, swab: 0 }}
        field="bottle"
      />
Severity: Major
Found in app/javascript/src/collected_inks/table/Counter.spec.jsx and 1 other location - About 1 hr to fix
app/javascript/src/collected_inks/table/Counter.spec.jsx on lines 19..24

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

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 { queryByText } = render(
      <Counter
        data={{ bottle: 1, sample: 3, cartridge: 0, swab: 0 }}
        field="cartridge"
      />
Severity: Major
Found in app/javascript/src/collected_inks/table/Counter.spec.jsx and 1 other location - About 1 hr to fix
app/javascript/src/collected_inks/table/Counter.spec.jsx on lines 8..13

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

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 inkConfig has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  inkConfig() {
    return {
      ...this.defaultConfig("ink_name"),
      Cell: ({ value, original: { ink_id } }) => {
        return (
Severity: Minor
Found in app/javascript/src/public_inks/table.jsx - About 1 hr to fix

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

              <tr>
                <th className="fw-normal" scope="row">
                  Archived
                </th>
                <td className="text-end">{archived}</td>
    Severity: Major
    Found in app/javascript/src/dashboard/inks_summary_widget.jsx and 8 other locations - About 1 hr to fix
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 29..34

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

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

              <tr>
                <th className="fw-normal" scope="row">
                  Collection
                </th>
                <td className="text-end">{count}</td>
    Severity: Major
    Found in app/javascript/src/dashboard/pens_summary_widget.jsx and 8 other locations - About 1 hr to fix
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 41..46
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 29..34

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

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

              <tr>
                <th className="fw-normal" scope="row">
                  Swabbed
                </th>
                <td className="text-end">{swabbed}</td>
    Severity: Major
    Found in app/javascript/src/dashboard/inks_summary_widget.jsx and 8 other locations - About 1 hr to fix
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 41..46
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 29..34

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

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

              <tr>
                <th className="fw-normal" scope="row">
                  Collection
                </th>
                <td className="text-end">{count}</td>
    Severity: Major
    Found in app/javascript/src/dashboard/inks_summary_widget.jsx and 8 other locations - About 1 hr to fix
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 41..46
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 29..34

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

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

              <tr>
                <th className="fw-normal" scope="row">
                  Currently inked pens
                </th>
                <td className="text-end">{active}</td>
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 41..46
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 29..34

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

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

              <tr>
                <th className="fw-normal" scope="row">
                  Used
                </th>
                <td className="text-end">{used}</td>
    Severity: Major
    Found in app/javascript/src/dashboard/inks_summary_widget.jsx and 8 other locations - About 1 hr to fix
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 41..46
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 29..34

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

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

              <tr>
                <th className="fw-normal" scope="row">
                  Archived
                </th>
                <td className="text-end">{archived}</td>
    Severity: Major
    Found in app/javascript/src/dashboard/pens_summary_widget.jsx and 8 other locations - About 1 hr to fix
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 41..46
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 23..28

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

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

              <tr>
                <th className="fw-normal" scope="row">
                  Total entries
                </th>
                <td className="text-end">{total}</td>
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 41..46
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 29..34

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

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

              <tr>
                <th className="fw-normal" scope="row">
                  Usage records
                </th>
                <td className="text-end">{usage_records}</td>
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/currently_inked_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 29..34
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 35..40
    app/javascript/src/dashboard/inks_summary_widget.jsx on lines 41..46
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 23..28
    app/javascript/src/dashboard/pens_summary_widget.jsx on lines 29..34

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

    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 state = {
            ...initalState,
            selectedBrands: ["selected brands"],
            selectedMicroClusters: [{ id: 1, type: "micro_cluster" }],
            microClusters: [{ id: 2, type: "micro_cluster" }]
    Severity: Minor
    Found in app/javascript/src/admin/components/clustering/reducer.spec.js and 1 other location - About 55 mins to fix
    app/javascript/src/admin/components/clustering/reducer.spec.js on lines 196..201

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

    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 state = {
            ...initalState,
            selectedBrands: ["selected brands"],
            selectedMicroClusters: [{ id: 1, type: "micro_cluster" }],
            microClusters: [{ id: 2, type: "micro_cluster" }]
    Severity: Minor
    Found in app/javascript/src/admin/components/clustering/reducer.spec.js and 1 other location - About 55 mins to fix
    app/javascript/src/admin/components/clustering/reducer.spec.js on lines 179..184

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

    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

      return matchSorter(rows, filterValue.replace(/\s+/gi, ""), {
        keys: [(row) => attrs.map((a) => row[a]).join("")]
      });
    Severity: Minor
    Found in app/javascript/src/currently_inked/cards/match.js and 1 other location - About 55 mins to fix
    app/javascript/src/collected_pens/cards/match.js on lines 25..27

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

    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

      return matchSorter(rows, filterValue.replace(/\s+/gi, ""), {
        keys: [(row) => attrs.map((a) => row[a]).join("")]
      });
    Severity: Minor
    Found in app/javascript/src/collected_pens/cards/match.js and 1 other location - About 55 mins to fix
    app/javascript/src/currently_inked/cards/match.js on lines 15..17

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

    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 getPage = async (page) => {
      const response = await getRequest(
        `/api/v1/collected_pens.json?filter[archived]=false&page[number]=${page}`
      );
      const json = await response.json();
    Severity: Minor
    Found in app/javascript/src/collected_pens/CollectedPens.jsx and 1 other location - About 55 mins to fix
    app/javascript/src/currently_inked/CurrentlyInked.jsx on lines 68..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 54.

    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

                      <td key={`thead-td-${i}-${j}`} {...cell.getCellProps()}>
                        {cell.render("Cell")}
                      </td>
    Severity: Minor
    Found in app/javascript/src/components/Table.jsx and 1 other location - About 55 mins to fix
    app/javascript/src/components/Table.jsx on lines 63..65

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

    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

                  <td key={`tfoot-td-${i}-${j}`} {...column.getFooterProps()}>
                    {column.render("Footer")}
                  </td>
    Severity: Minor
    Found in app/javascript/src/components/Table.jsx and 1 other location - About 55 mins to fix
    app/javascript/src/components/Table.jsx on lines 46..48

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

    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 getPage = async (page) => {
      const response = await getRequest(
        `/api/v1/currently_inked.json?filter[archived]=false&page[number]=${page}`
      );
      const json = await response.json();
    Severity: Minor
    Found in app/javascript/src/currently_inked/CurrentlyInked.jsx and 1 other location - About 55 mins to fix
    app/javascript/src/collected_pens/CollectedPens.jsx on lines 54..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 54.

    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