Commit 8a16c710 authored by Daniel Martí's avatar Daniel Martí

cmd/vet: -composites only checks imported types

The check has worked this way for a long time, but it has never been
well documented.

For #25453.

Change-Id: If603e53348ba51f73b2f449b943c6f97f64aa3eb
Reviewed-on: https://go-review.googlesource.com/113755
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarRob Pike <r@golang.org>
parent 226651a5
...@@ -18,7 +18,7 @@ var compositeWhiteList = flag.Bool("compositewhitelist", true, "use composite wh ...@@ -18,7 +18,7 @@ var compositeWhiteList = flag.Bool("compositewhitelist", true, "use composite wh
func init() { func init() {
register("composites", register("composites",
"check that composite literals used field-keyed elements", "check that composite literals of types from imported packages use field-keyed elements",
checkUnkeyedLiteral, checkUnkeyedLiteral,
compositeLit) compositeLit)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment