ruabmbua / hidapi-rs

Rust bindings for the hidapi C library
MIT License
173 stars 82 forks source link

Check code formatting in CI #140

Closed YgorSouza closed 8 months ago

YgorSouza commented 8 months ago

Run cargo fmt --check in CI to ensure the code is properly formatted before it is merged to master (it is not the case at the moment).

This also prevents contributors with "format on save" on their editors from making random changes to parts of the code they didn't actually touch, which makes things easier for everyone.

The format settings can optionally be changed by adding a rustfmt.toml file to the repo, as specified in https://github.com/rust-lang/rustfmt/blob/master/Configurations.md. But the defaults are generally pretty reasonable, so that might not be needed.