Skip to content

Commit

Permalink
add pre-commit yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
mvadari committed Jun 29, 2023
1 parent 1c2ae10 commit 353d2ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# .pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v10.0.1
hooks:
- id: clang-format
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ this:
You can format individual files in place by running `clang-format -i <file>...`
from any directory within this project.

You can also install a pre-commit hook to automatically run `clang-format` before every commit:
```
pip3 install pre-commit
pre-commit install
```

## Avoid

Expand Down

0 comments on commit 353d2ae

Please sign in to comment.