Skip to content

Commit 87286a7

Browse files
authoredApr 21, 2024··
Merge pull request #43 from ldez/fix/panic
fix: index out of range
2 parents 48db570 + ced60a7 commit 87286a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎promlinter.go

+4
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,10 @@ func (v *visitor) parseSendMetricChanExpr(chExpr *ast.SendStmt) ast.Visitor {
347347
return v
348348
}
349349

350+
if len(call.Args) == 0 {
351+
return v
352+
}
353+
350354
name, help := v.parseConstMetricOptsExpr(call.Args[0])
351355
if name == nil {
352356
return v

0 commit comments

Comments
 (0)
Please sign in to comment.