jish / pre-commit

A slightly improved pre-commit hook for git
https://jish.github.io/pre-commit/
Other
796 stars 96 forks source link

Check new code only #277

Open robbat2 opened 6 years ago

robbat2 commented 6 years ago

This is going to take a bit of doing, but was wondering about the conceptual parts of it first.

When adding pre-commit to an existing codebase, there can be a lot of errors, and you still want to prevent introduction of new errors, plus whittle down the existing errors over time.

To that end, a mode that excludes errors due to pre-existing code, and only flags errors in new commits.

I can see a few ways that this could be mostly accomplished, but not reliably: