Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
osv-scanner
pre-commit hook (#669)
This change exposes a pre-commit hook for people to use that would run osv-scanner when commiting code to their codebase. Resolves #60. I manually tested this change by modifying the `.pre-commit-config.yaml` file from the [pipdeptree](https://github.com/tox-dev/pipdeptree) project to the following: ```yml repos: - repo: https://github.com/kemzeb/osv-scanner rev: 321d06b hooks: - id: osv-scanner args: ["-r", "."] ``` ...where I ran pre-commit locally by doing the following: Install the pre-commit script: ```console pre-commit install ``` Run while using all the files in the pipdeptree repo, while also providing verbose output produced by osv-scanner (I truncated the output but wanted to make aware that the `-v` option is available): ``` console pre-commit run -av osv-scanner..............................................................Passed - hook id: osv-scanner - duration: 0.47s .... // verbose output here ``` Let me know if there is an interest in using any of the other pre-commit hook [configurations ](https://pre-commit.com/#creating-new-hooks)
- Loading branch information