pacificclimate/climate-explorer-frontend

View on GitHub
src/components/guidance-content/info/InformationItems.js

Summary

Maintainability
F
1 wk
Test Coverage

File InformationItems.js has 700 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Central resource for LabelWithInfo and Information items used throughout
// the app.

import React from "react";
import { Link } from "react-router-dom";
Severity: Major
Found in src/components/guidance-content/info/InformationItems.js - About 1 day to fix

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

    const mapPolygonEditControls = (
      <span>
        <LeafletControlContainer>
          <div className="leaflet-draw leaflet-control">
            <div className="leaflet-draw-section">
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 1 other location - About 6 hrs to fix
    src/components/guidance-content/info/InformationItems.js on lines 54..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 170.

    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 mapPolygonDrawControls = (
      <span>
        <LeafletControlContainer>
          <div className="leaflet-draw leaflet-control">
            <div className="leaflet-draw-section">
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 1 other location - About 6 hrs to fix
    src/components/guidance-content/info/InformationItems.js on lines 117..135

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

    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 mapDeleteControl = (
      <span>
        <LeafletControlContainer>
          <div className="leaflet-draw leaflet-control">
            <div className="leaflet-draw-section">
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 1 other location - About 4 hrs to fix
    src/components/guidance-content/info/InformationItems.js on lines 80..98

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 129.

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

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

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

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

    Refactorings

    Further Reading

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

    const mapCircleMarkerControl = (
      <span>
        <LeafletControlContainer>
          <div className="leaflet-draw leaflet-control">
            <div className="leaflet-draw-section">
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 1 other location - About 4 hrs to fix
    src/components/guidance-content/info/InformationItems.js on lines 100..115

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 129.

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

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

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

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

    Refactorings

    Further Reading

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

            <tr>
              <td>rcp45/ssp245</td>
              <td>
                <a
                  href="https://climate-scenarios.canada.ca/?page=scen-rcp"
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 1 other location - About 3 hrs to fix
    src/components/guidance-content/info/InformationItems.js on lines 335..355

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

    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

            <tr>
              <td>rcp26/ssp126</td>
              <td>
                <a
                  href="https://climate-scenarios.canada.ca/?page=scen-rcp"
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 1 other location - About 3 hrs to fix
    src/components/guidance-content/info/InformationItems.js on lines 356..376

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

    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

    export const downloadGraphDataLabel = (
      <LabelWithInfo label={exportDataLabel}>
        <p>Click a button to download the selected data to your computer.</p>
        <p>
          The data downloaded is that shown on the graph. For details on the layout
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 1 other location - About 2 hrs to fix
    src/components/guidance-content/info/InformationItems.js on lines 770..782

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

    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

    export const exportStatsTableDataLabel = (
      <LabelWithInfo label={exportDataLabel}>
        <p>
          Click a button to export the contents of the statistical summary table.
        </p>
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 1 other location - About 2 hrs to fix
    src/components/guidance-content/info/InformationItems.js on lines 518..528

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

    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

    export const percentileLtaTabLabel = (
      <LabelWithInfo label="Design Values">
        <p>Design value graphs with percentile range for the selected variable.</p>
        <p>{designValueGraphDefn}</p>
        <p>{pointAreaDefn}</p>
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 1 other location - About 2 hrs to fix
    src/components/guidance-content/info/InformationItems.js on lines 590..600

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

    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

    export const singleAnnualCycleTabLabel = (
      <LabelWithInfo label="Annual Cycle">
        <p>
          Annual cycle graph showing the yearly, seasonal, and monthly mean values
          of the selected variable.
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 1 other location - About 2 hrs to fix
    src/components/guidance-content/info/InformationItems.js on lines 641..648

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

    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

    export const dualLtaTabLabel = (
      <LabelWithInfo label="Long Term Average">
        Long term average graphs for the two selected variables (if different).
        <p>{ltaGraphDefn}</p>
        <p>{spatialAveragingDefn}</p>
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 1 other location - About 1 hr to fix
    src/components/guidance-content/info/InformationItems.js on lines 602..610

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

    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

    export const dualAnnualCycleTabLabel = (
      <LabelWithInfo label="Annual Cycle">
        Annual cycle graphs showing the yearly, seasonal, and monthly mean values of
        the two selected variables (if different).
        <p>{annualCycleGraphDefn}</p>
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 1 other location - About 1 hr to fix
    src/components/guidance-content/info/InformationItems.js on lines 650..657

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

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

    export const graphsPanelLabel = (
      <LabelWithInfo label="Data Graphs">
        <p>
          Graphs showing various slices and views of the dataset(s) selected by
          Model, Emissions scenario, and Variable(s).
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 5 other locations - About 55 mins to fix
    src/components/guidance-content/info/InformationItems.js on lines 424..429
    src/components/guidance-content/info/InformationItems.js on lines 580..588
    src/components/guidance-content/info/InformationItems.js on lines 659..669
    src/components/guidance-content/info/InformationItems.js on lines 691..699
    src/components/guidance-content/info/InformationItems.js on lines 701..706

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

    export const snapshotTabLabel = (
      <LabelWithInfo label="Snapshot">
        <p>
          Shows all model results at a single point in time, for the selected
          variable and emissions scenario, with the selected model highlighted.
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 5 other locations - About 55 mins to fix
    src/components/guidance-content/info/InformationItems.js on lines 424..429
    src/components/guidance-content/info/InformationItems.js on lines 570..578
    src/components/guidance-content/info/InformationItems.js on lines 580..588
    src/components/guidance-content/info/InformationItems.js on lines 659..669
    src/components/guidance-content/info/InformationItems.js on lines 701..706

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

    export const timeSeriesTabLabel = (
      <LabelWithInfo label="Time Series">
        <p>Simple graph of data values against time.</p>
        <p>{spatialAveragingDefn}</p>
      </LabelWithInfo>
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 5 other locations - About 55 mins to fix
    src/components/guidance-content/info/InformationItems.js on lines 424..429
    src/components/guidance-content/info/InformationItems.js on lines 570..578
    src/components/guidance-content/info/InformationItems.js on lines 580..588
    src/components/guidance-content/info/InformationItems.js on lines 659..669
    src/components/guidance-content/info/InformationItems.js on lines 691..699

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

    export const variable1SelectorLabel = (
      <LabelWithInfo label="Variable 1 (Raster)">
        <p>First or 'primary' variable to view.</p>
        <p>{colourBlocksVariable}</p>
      </LabelWithInfo>
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 5 other locations - About 55 mins to fix
    src/components/guidance-content/info/InformationItems.js on lines 570..578
    src/components/guidance-content/info/InformationItems.js on lines 580..588
    src/components/guidance-content/info/InformationItems.js on lines 659..669
    src/components/guidance-content/info/InformationItems.js on lines 691..699
    src/components/guidance-content/info/InformationItems.js on lines 701..706

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

    export const watershedGraphsPanelLabel = (
      <LabelWithInfo label="Data Graphs">
        <p>
          Graphs showing various slices and views of the dataset(s) selected by
          Model, Emissions scenario, and Variable(s).
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 5 other locations - About 55 mins to fix
    src/components/guidance-content/info/InformationItems.js on lines 424..429
    src/components/guidance-content/info/InformationItems.js on lines 570..578
    src/components/guidance-content/info/InformationItems.js on lines 659..669
    src/components/guidance-content/info/InformationItems.js on lines 691..699
    src/components/guidance-content/info/InformationItems.js on lines 701..706

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

    export const modelContextTabLabel = (
      <LabelWithInfo label="Model Context">
        <p>
          Graph of average value of the selected value, taken over a multi-decade
          period, for each model and run available for the selected Emissions
    Severity: Major
    Found in src/components/guidance-content/info/InformationItems.js and 5 other locations - About 55 mins to fix
    src/components/guidance-content/info/InformationItems.js on lines 424..429
    src/components/guidance-content/info/InformationItems.js on lines 570..578
    src/components/guidance-content/info/InformationItems.js on lines 580..588
    src/components/guidance-content/info/InformationItems.js on lines 691..699
    src/components/guidance-content/info/InformationItems.js on lines 701..706

    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

    export const watershedTableLabel = (
      <LabelWithInfo label="Watershed Upstream Of Selected Point">
        <p>
          This table presents information about the selected grid and its upstream
          area or watershed. The table is only populated if an outlet location has
    Severity: Minor
    Found in src/components/guidance-content/info/InformationItems.js and 1 other location - About 45 mins to fix
    src/components/guidance-content/info/InformationItems.js on lines 262..272

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

    export const datasetFilterPanelLabel = (
      <LabelWithInfo label="Dataset Filter">
        <p>This filter determines which datasets can be displayed.</p>
        <p>
          Datasets matching these filter criteria can be displayed in the map, on
    Severity: Minor
    Found in src/components/guidance-content/info/InformationItems.js and 1 other location - About 45 mins to fix
    src/components/guidance-content/info/InformationItems.js on lines 787..803

    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

    There are no issues that match your filters.

    Category
    Status