jeroentvb/wind-scrape

View on GitHub
src/partials/data-parsers/windy-parser.ts

Summary

Maintainability
B
4 hrs
Test Coverage

Function parse has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

   parse(): this {
      this.parsedData = {
         name: this.extractedData.name,
         models: this.extractedData.models.map((model) => {
            const hours: WindyModelHour[] = model.time.map((hour, i) => ({
Severity: Minor
Found in src/partials/data-parsers/windy-parser.ts - About 1 hr to fix

    Function models has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

             models: this.extractedData.models.map((model) => {
                const hours: WindyModelHour[] = model.time.map((hour, i) => ({
                   hour,
                   windspeed: model.windspeed[i],
                   windgust: model.windgust[i],
    Severity: Minor
    Found in src/partials/data-parsers/windy-parser.ts - About 1 hr to fix

      Function extract has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

         extract(): this {
            this.extractedData = {
               name: 'Windy',
               date: this.getDataArray(['.sticky-title-wrapper', '.td-days'], (el) => this.$(el).data('day')),
               models: this.getDataArray(['.legend-left', '.legend-windCombined'], (el, i) => {
      Severity: Minor
      Found in src/partials/data-parsers/windy-parser.ts - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status