Skip to content

Commit

Permalink
Add precommit instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Pizzo committed Jul 16, 2024
1 parent afbadcb commit 567332c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,30 @@ $ codeowners-cli verify
CODEOWNERS file is valid.
```
## Pre-commit Usage
To use with Pre-commit, simply add the following to your `.pre-commit-config.yaml`:
### To prevent committing unowned files (also validate CODEOWNERS format)
```yaml
- repo: https://github.com/vincentjames501/codeowners-cli
rev: v0.0.3
hooks:
- id: codeowners-cli
args: [ "list", "--unowned-files", "--fail-on-output" ]
```
### To prevent committing just invalid CODEOWNERS
```yaml
- repo: https://github.com/vincentjames501/codeowners-cli
rev: v0.0.3
hooks:
- id: codeowners-cli
args: [ "verify" ]
```
## Building
This is powered by GraalVM native image and distribution using JReleaser and GitHub Actions and Workflow.
Expand Down

0 comments on commit 567332c

Please sign in to comment.