pacificclimate/climate-explorer-frontend

View on GitHub
src/components/graphs/PercentileLongTermAveragesGraph.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function PercentileLongTermAveragesGraph has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function PercentileLongTermAveragesGraph(props) {
  function getMetadata(timeOfYear) {
    // get a list of all available percentiles
    function parsePercentile(metad) {
      const clim_stat = metad["climatological_statistic"];
Severity: Major
Found in src/components/graphs/PercentileLongTermAveragesGraph.js - About 2 hrs to fix

    Function getMetadata has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function getMetadata(timeOfYear) {
        // get a list of all available percentiles
        function parsePercentile(metad) {
          const clim_stat = metad["climatological_statistic"];
          if (_.startsWith(clim_stat, "percentile")) {
    Severity: Minor
    Found in src/components/graphs/PercentileLongTermAveragesGraph.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status