I don't think we need to use an entirely separate GOPATH, thus forcing
us to re-download modules every time we run `make`
This was causing verify-generated-docs to fail locally since go will
set its modcache as readonly and thus cause the cleanup "rm -rf" in
this script to fail. In go1.14 or later we could use "-modcacherw"
to stop making the modcache readonly but that bring me back to.. why
do need an entirely separate GOPATH in the first place?
The following formatting is enforced:
- Consistent identation of 2 spaces
- Keys are sorted by order of struct fields
- Lists are sorted by struct-dependent keys
- Comments are stripped
I had hopes of using yaml.Node to preserve comments, but found no
obvious way to marshal from struct to Node, meaning all data
manipulation had to be done against Nodes. This loses us all of the
benefits of using a struct: types, known fields, field order.
Given that there aren't many comments in sigs.yaml to begin with, I'm
erring on the side of dropping support for them.
When the hack/verify-generated-docs.sh job fails because a generated
file was edited instead of the sigs.yaml file, it is less than clear
from the error message that the user still needs to manually commit the
generated docs in addition to changing the sigs.yaml and validating that
the docs do build. A small additional bit of guidance is appended to
the existing hint in the test error output.
Signed-off-by: Tim Pepper <tpepper@vmware.com>