anchor
anchor copied to clipboard
git: Add git hooks
ci will fail if cargo fmt -- --check
or cargo clippy --all-targets -- -D warnings
fail. this can be prevented locally with git hooks that abort commit if these checks fail
Maybe we shouldn't use clippy in a hook, if that implies clippy is run for every commit? That can take a while and might be annoying.
right that is annoying. ok just fmt then, could also add lint for ts and add lint checks to the ci
I'm ok with hook for every commit if I can disable it :laughing:
Clippy might be OK as a pre-push hook rather than a pre-commit hook and then git push --no-verify
if you want to skip. I think it's roughly equally painful waiting for the pre-push hook as it is waiting for the CI failure because you didn't run it 🤣
pre-push sounds good for clippy!
ci failure is more painful for me because even with cache it takes two minutes to even get to the clippy command
Hi, can anyone guide me on this issue about how to solve it ?