go/analysis/internal/analysisflags: add flag aliases for renames
Some of the Analyzers' names were changed during the refactoring. These legacy flags ensure the old names continue to work. Change-Id: I466aa38ec55071c944fb73571915aa7afb42dbc2 Reviewed-on: https://go-review.googlesource.com/c/149417 Reviewed-by: Michael Matloob <matloob@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org>
This commit is contained in:
parent
ea84011da2
commit
c921186869
|
@ -234,6 +234,13 @@ func (ts triState) IsBoolFlag() bool {
|
|||
// vetLegacyFlags maps flags used by legacy vet to their corresponding
|
||||
// new names. The old names will continue to work.
|
||||
var vetLegacyFlags = map[string]string{
|
||||
// Analyzer name changes
|
||||
"bool": "bools",
|
||||
"buildtags": "buildtag",
|
||||
"methods": "stdmethods",
|
||||
"rangeloops": "loopclosure",
|
||||
|
||||
// Analyzer flags
|
||||
"compositewhitelist": "composites.whitelist",
|
||||
"printfuncs": "printf.funcs",
|
||||
"shadowstrict": "shadow.strict",
|
||||
|
|
Loading…
Reference in New Issue