pre-commit-hooks #329
No reviewers
Labels
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/artiq-zynq#329
Loading…
Reference in New Issue
No description provided.
Delete Branch "newell/artiq-zynq:pre-commit-hooks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add
pre-commit
hooks toartiq-zynq
.@ -0,0 +1,32 @@
BasedOnStyle: LLVM
Isn't rustfmt.toml enough already?
I don't know. I was modeling this branch after what
nac3
does with its pre-commit hooks but there could very well be some parameters that should be changed (such as removing the line of code you are commenting on). Open to suggestions.@esavkin Pay attention to the file name and its contents ("Language: Cpp"...), this is about Clang/C/C++ not Rust.
That being said I don't see this clang formatter being applied in the precommit hook, neither here nor in nac3. @derppening
Also does it work with pure C code like https://git.m-labs.hk/M-Labs/artiq-zynq/src/branch/master/src/libc/src/printf.c ?
Just tested with the C code and it doesn't catch it:
NOTE: I did test with Rust code before creating the pull request and it does catch that.
It's not in NAC3 at the moment. We should enable it at some point though.
I updated the branch with a clang-format hook.
@ -0,0 +6,4 @@
repos:
- repo: local
hooks:
- id: nac3-cargo-fmt
nac3?