Open rickeylev opened 1 year ago
I was just going to create a pull request for the same thing. It would be nice to be able to use addlicense repo as a pre-commit hook, instead of creating a mirror fork to maintain independently. Right now, I am just hacking things and injecting my own .pre-commit-hooks.yaml file on the downloaded source after installing with pre-commit to at least support locally.
This allows easily using
addlicense
with pre-commit.com hook configs to automatically run when committing.An example example
.pre-commit-config.yaml
for a user would look like:And under the hood,
pre-commit
willgo install
theaddlicense
program and run it on the affected files with the specified args.