Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
rules:
- id: loopclosure
patterns:
- pattern-inside: |
for $A, $B := range $C {
...
}
go func() {
}()
- pattern-not-inside: |
go func(..., $B, ...) {
}(..., $B, ...)
for ... {
- pattern: $B
message: Loop variable $B used inside goroutine
languages:
- go
severity: WARNING