mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-06 09:51:25 +01:00
This starts running the jsontags vet checker on the module. All existing findings are adding to an allowlist. Updates tailscale/corp#791 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
25 lines
557 B
Go
25 lines
557 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
// Package vet is a tool to statically check Go source code.
|
|
package main
|
|
|
|
import (
|
|
_ "embed"
|
|
|
|
"golang.org/x/tools/go/analysis/unitchecker"
|
|
"tailscale.com/cmd/vet/jsontags"
|
|
)
|
|
|
|
//go:embed jsontags_allowlist
|
|
var jsontagsAllowlistSource string
|
|
|
|
func init() {
|
|
jsontags.RegisterAllowlist(jsontags.ParseAllowlist(jsontagsAllowlistSource))
|
|
jsontags.RegisterPureIsZeroMethods(jsontags.PureIsZeroMethodsInTailscaleModule)
|
|
}
|
|
|
|
func main() {
|
|
unitchecker.Main(jsontags.Analyzer)
|
|
}
|