gamedig / rust-gamedig

Game Server Query Library.
https://crates.io/crates/gamedig
MIT License
38 stars 11 forks source link

[PreCommit] Add clippy and rustfmt pre-commit hooks #50

Closed Douile closed 1 year ago

Douile commented 1 year ago

These hooks can be installed using pre-commit, with: "pre-commit install". Once installed they will prevent you from committing if the staged code has clippy warnings or hasn't been formatted. You can skip the pre-commit checks by adding the "-n" flag to your git commit command.

The hooks also require rustup as the nightly versions of rustfmt and clippy are used.