open-nomad/.semgrep/time_after.yml

17 lines
364 B
YAML
Raw Normal View History

rules:
- id: "time-after-leak"
patterns:
- pattern: |
select {
case <- time.After(...): ...
}
message: "Potential leak of time.Timer, consider using NewSafeTimer instead"
languages:
- "go"
severity: "WARNING"
paths:
exclude:
- "testutil/*"
- "*testing.go"
- "*_test.go"