open-nomad/.semgrep/time_after.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
432 B
YAML
Raw Normal View History

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
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"