git-ratchet
git-ratchet copied to clipboard
Add a flag to count new measures with > 0 errors as an increase in errors.
My case: Using ESLint, if there are no errors for a particular rule (say "no-var") then the ESLint output file won't include this rule (it won't tell us "no-var: 0 errors"). So git-ratchet doesn't know about this rule when we start keeping track of our ESLint results. If later on that rule comes up with 1 error, git-ratchet counts it as a new measure, which aren't treated as errors, and so it doesn't complain even though it's technically increased from 0 errors to 1.
It would be good if there was a flag we could pass to git-ratchet to handle these cases where we want to count new measures as errors.
Could you seed your notes at the time you add the new rule? Get a dump of your last run of git-ratchet, which should just be in CSV format. Add the new measures to that, then pass that back through git-ratchet. That would set the initial value of the measure to zero.
Yep that is an option, to pass into git ratchet a file which contains all possible error measures so that it knows about them from now on. It's just a bit of a hacky workaround though, and I still think this feature request makes sense.
I think this request might be problematic in practice due to the ease of false negatives if rules get renamed. Essentially, null data will get treated as a zero, even if it's a problem with partial data being generated.