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

Add utility to install git hooks. #787

Merged
merged 1 commit into from
Jun 14, 2022
Merged

Conversation

Alexhuszagh
Copy link
Contributor

Adds the install-git-hooks to cross-dev, which installs pre-commit hooks to ensure clippy and fmt are run on all commits.

@Alexhuszagh Alexhuszagh requested a review from a team as a code owner June 13, 2022 16:48
@Alexhuszagh
Copy link
Contributor Author

This probably should have a powershell script for Windows, IMO, rather than bash.


cargo fmt -- --check
cargo clippy --all-features -- --deny warnings
if cargo +nightly >/dev/null 2>&1; then
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed this to silently check of the nightly channel is installed, and only run the clippy check if it is.

xtask/src/pre-commit Outdated Show resolved Hide resolved
xtask/src/install_git_hooks.rs Outdated Show resolved Hide resolved
xtask/src/pre-commit Outdated Show resolved Hide resolved
Adds the `install-git-hooks` to `xtask`, which installs pre-commit
hooks to ensure clippy and fmt are run on all commits.
Copy link
Member

@Emilgardis Emilgardis left a comment

Choose a reason for hiding this comment

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

bors r+

@bors
Copy link
Contributor

bors bot commented Jun 14, 2022

Build succeeded:

@bors bors bot merged commit 5fe2145 into cross-rs:main Jun 14, 2022
@Emilgardis Emilgardis added this to the v0.2.2 milestone Jun 15, 2022
@Alexhuszagh Alexhuszagh deleted the git_hooks branch June 23, 2022 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants