Allows to impose limits on the lines-per-assertions ratio for functions.
As referenced in:
- JPL coding standard, section 3. Defensive Coding, Rule 16. Use static and dynamic assertions as sanity checks.
- http://llvm.org/docs/CodingStandards.html#assert-liberally
Finds functions that have more than LinesThreshold lines, counts assertions
in them, and if the ratio of lines-per-assert is higher than configured,
emits a warning.
The lines-per-assert ratio can be controlled via four options, which form
a stair-step curve, with first two options controlling the static part, and
the second two controlling the dynamic part - i.e. how the expected minimal
assertion count changes with the line count.
I think, this is pretty much ready for review.
One big missing thing that i know of is an ability to also count C++ lambdas,
but i have tried and failed to do that.