Adjusted word count limit upwards to take headers into account,
and support bios that might be just over the line.
Adjusted script so it stops running against files other than bios.
Signed-off-by: Josh Berkus <josh@agliodbs.com>
The steering committee election policy states that all bios must be
limited to 300 words. This commits adds a verify script to check this.
Some bios from 2017-2020 exceed this limit so the script explicitly
avoids looking at the past elections.
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?
There was still a lot of manual massaging of the script's
output that needed to happen before it was usable as a PR
to cncf/devstats.
I have now tried to encode as much of that knowledge in
code and comments here to allow the output of the script
to overwrite the existing file.
- add header/footer
- add comment pointing to this script
- add special case group for "Kubernetes"
- add support for committees that own code
- (manually) keep track of old repo names for history
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>