From 1e916ae6c66cf63dc693f8e4ed20de0ab62150f6 Mon Sep 17 00:00:00 2001 From: Talon Bowler Date: Mon, 10 Jun 2024 12:22:08 -0700 Subject: [PATCH] add length check for lint message regex result Signed-off-by: Talon Bowler --- util/progress/metricwriter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/progress/metricwriter.go b/util/progress/metricwriter.go index faaf9782..23d0fc50 100644 --- a/util/progress/metricwriter.go +++ b/util/progress/metricwriter.go @@ -459,7 +459,7 @@ func kebabToCamel(s string) string { func (mr *lintMetricRecorder) Record(ss *client.SolveStatus) { for _, warning := range ss.Warnings { m := reLintMessage.FindSubmatch([]byte(warning.URL)) - if m == nil { + if len(m) < 2 { continue }