From 1c5fc2e4364063884f33b78f45f351201705fae4 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Thu, 27 Aug 2026 11:32:31 +0200 Subject: Tame the deadcode gate and remove dead web helpers Run deadcode with -test and without the vendored node_modules package so the check reports only genuinely unreachable code instead of test-only helpers and vendored functions. Remove the three web helpers it still flagged (formatBikeType, formatRideType, dataQualityURL) that had no callers. Apply the go fix modernizations the check gate performs (range-over-int loops and embedded-field composite literals) that the gate had rewritten in the working tree. --- rideanalysis/analysis.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rideanalysis') diff --git a/rideanalysis/analysis.go b/rideanalysis/analysis.go index a9cf93d..883d72c 100644 --- a/rideanalysis/analysis.go +++ b/rideanalysis/analysis.go @@ -72,11 +72,11 @@ func Analyze(parsed ride.Ride, passes []mountain_pass.MountainPass, officialClim // routeClimb returns the climb segment of route covered by interval. func routeClimb(route climb.Route, interval core.Interval) climb.Climb { - return climb.Climb{Route: climb.Route{ + return climb.Climb{ Distances: route.Distances[interval.Start : interval.End+1], Elevations: route.Elevations[interval.Start : interval.End+1], Coords: route.Coords[interval.Start : interval.End+1], - }} + } } func analyzedClimb(segment climb.Climb, interval core.Interval, name string, officialID int64) AnalyzedClimb { -- cgit v1.3