mirror of
https://github.com/hashicorp/vault.git
synced 2026-04-17 03:32:20 +02:00
* license: update headers to IBM Corp. * `make proto` * update offset because source file changed Signed-off-by: Ryan Cragun <me@ryan.ec> Co-authored-by: Ryan Cragun <me@ryan.ec>
32 lines
656 B
YAML
32 lines
656 B
YAML
# Copyright IBM Corp. 2016, 2025
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
rules:
|
|
- id: loopclosure
|
|
patterns:
|
|
- pattern-inside: |
|
|
for $A, $B := range $C {
|
|
...
|
|
}
|
|
- pattern-inside: |
|
|
go func() {
|
|
...
|
|
}()
|
|
- pattern-not-inside: |
|
|
go func(..., $B, ...) {
|
|
...
|
|
}(..., $B, ...)
|
|
- pattern-not-inside: |
|
|
go func() {
|
|
...
|
|
for ... {
|
|
...
|
|
}
|
|
...
|
|
}()
|
|
- pattern: $B
|
|
message: Loop variable $B used inside goroutine
|
|
languages:
|
|
- go
|
|
severity: WARNING
|