add length check for lint message regex result

Signed-off-by: Talon Bowler <talon.bowler@docker.com>
This commit is contained in:
Talon Bowler 2024-06-10 12:22:08 -07:00
parent d342cb9d03
commit 1e916ae6c6
1 changed files with 1 additions and 1 deletions

View File

@ -459,7 +459,7 @@ func kebabToCamel(s string) string {
func (mr *lintMetricRecorder) Record(ss *client.SolveStatus) { func (mr *lintMetricRecorder) Record(ss *client.SolveStatus) {
for _, warning := range ss.Warnings { for _, warning := range ss.Warnings {
m := reLintMessage.FindSubmatch([]byte(warning.URL)) m := reLintMessage.FindSubmatch([]byte(warning.URL))
if m == nil { if len(m) < 2 {
continue continue
} }