dkubb / yardstick

A tool for verifying YARD documentation coverage
http://wiki.github.com/dkubb/yardstick
MIT License
172 stars 22 forks source link

Threshold is minimum rather than exact. #21

Open trans opened 10 years ago

trans commented 10 years ago

I am not sure why Yardstick would exit non-zero if coverage is above the set threshold, i.e. I don't know why any one would want it to be "exact" (for anything below 100%).

dkubb commented 10 years ago

@trans my rationale behind using an exact threshold is that if it changes, I usually want to know. If it improves, I want to raise the bar so that if my coverage drops I know about it right away. If it drops, then I know I'm letting things slide and I need to bring it back up.

I can understand that other people have different workflows. I wonder if perhaps having 3 flags:

Setting minimum_threshold would set the lower bounds, and maximum_threshold would set the upper bounds. Setting the threshold would set the first two flags, effectively making it so that the threshold needs to be an exact match, like it is now.

trans commented 10 years ago

I wonder, could it store the previous coverage score and thus be able to report changes between runs? Then it could simply return non-zero status if coverage goes down instead of up (or equal).