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:
@@ -906,8 +906,8 @@ func (obj *ExclusiveInvariant) simplify(partials []interfaces.Invariant) ([]inte
|
||||
}
|
||||
|
||||
// exclusivesProduct returns a list of different products produced from the
|
||||
// combinatorial product of the list of exclusives. Each ExclusiveInvariant
|
||||
// must contain between one and more Invariants. This takes every combination of
|
||||
// combinatorial product of the list of exclusives. Each ExclusiveInvariant must
|
||||
// contain between one and more Invariants. This takes every combination of
|
||||
// Invariants (choosing one from each ExclusiveInvariant) and returns that list.
|
||||
// In other words, if you have three exclusives, with invariants named (A1, B1),
|
||||
// (A2), and (A3, B3, C3) you'll get: (A1, A2, A3), (A1, A2, B3), (A1, A2, C3),
|
||||
|
||||
Reference in New Issue
Block a user