Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix husky fmt hook. #1868

Merged
merged 3 commits into from
Nov 2, 2021
Merged

Fix husky fmt hook. #1868

merged 3 commits into from
Nov 2, 2021

Conversation

dessalines
Copy link
Member

This one shouldn't have slipped in. cargo-husky has no lint-staged like node, so running fmt on these doesn't stage the files at all, and will let you commit unformatted files. Making this a format check again to fix.

@Nutomic
Copy link
Member

Nutomic commented Oct 29, 2021

I actually changed this on purpose, but ran into the exact problem you mentioned and was gonna change it back.

While were at it, i think we can change the cargo clippy command to use the default Rust version, there is no reason to force nightly (which means extra compilation time).

@dessalines
Copy link
Member Author

dessalines commented Oct 29, 2021

k done.

run to fix:

cp .cargo-husky/hooks/pre-commit .git/hooks/

@@ -1,9 +1,9 @@
#!/bin/bash
set -e

cargo +nightly fmt
cargo fmt -- --check
Copy link
Member

@Nutomic Nutomic Nov 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fmt needs to be run on nightly though.

@Nutomic Nutomic merged commit 87bc276 into main Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants