test: Add a check for too long or badly reflowed docstrings
This ensures that docstring comments are wrapped to 80 chars. ffrank seemed to be making this mistake far too often, and it's a silly thing to look for manually. As it turns out, I've made it too, as have many others. Now we have a test that checks for most cases. There are still a few stray cases that aren't checked automatically, but this can be improved upon if someone is motivated to do so. Before anyone complains about the 80 character limit: this only checks docstring comments, not source code length or inline source code comments. There's no excuse for having docstrings that are badly reflowed or over 80 chars, particularly if you have an automated test.
This commit is contained in:
@@ -128,7 +128,8 @@ func calculateMax(deploys map[uint64]string) uint64 {
|
||||
// GetDeploy returns the deploy with the specified id if it exists. If you input
|
||||
// an id of 0, you'll get back an empty deploy without error. This is useful so
|
||||
// that you can pass through this function easily.
|
||||
// FIXME: implement this more efficiently so that it doesn't have to download *all* the old deploys from etcd!
|
||||
// FIXME: implement this more efficiently so that it doesn't have to download
|
||||
// *all* the old deploys from etcd!
|
||||
func (obj *SimpleDeploy) GetDeploy(ctx context.Context, id uint64) (string, error) {
|
||||
result, err := obj.GetDeploys(ctx)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user