mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-27 12:06:31 -08:00
cmd/vet: add copylock analyzer
golangci-lint already runs copylocks, but only reports issues on lines changed by a PR, so adding a mutex to an existing struct can silently make old copies of it wrong. Run it over the whole tree in our custom vettool instead of adding another CI job. Fixes #22645 Signed-off-by: Brad Fitzpatrick <[email protected]> Change-Id: Idb10b163df6b8b7bff6db48d2545cb9ef917f4d1
This commit is contained in:
1 parent
8bcc919dcf
commit
0392731cfe
1 file changed
+2
-1
+2
-1
@@ -7,6 +7,7 @@ package main
|
||||
import (
|
||||
_ "embed"
|
||||
|
||||
"golang.org/x/tools/go/analysis/passes/copylock"
|
||||
"golang.org/x/tools/go/analysis/unitchecker"
|
||||
"tailscale.com/cmd/vet/jsontags"
|
||||
"tailscale.com/cmd/vet/lowerell"
|
||||
@@ -22,5 +23,5 @@ func init() {
|
||||
}
|
||||
|
||||
func main() {
|
||||
unitchecker.Main(jsontags.Analyzer, lowerell.Analyzer, subtestnames.Analyzer)
|
||||
unitchecker.Main(copylock.Analyzer, jsontags.Analyzer, lowerell.Analyzer, subtestnames.Analyzer)
|
||||
}
|
||||
Reference in new issue
Block a user