krojew/cdrs-tokio

Add cargo fmt and clippy checks into CI

Closed this issue · 2 comments

Something like this in CI would be useful to add for code quality:

- name: Format check
  run: cargo fmt --verbose --all -- --check
- name: Clippy check
  run: cargo clippy --verbose --examples --tests -- -D warnings

@krojew I think it's better to make the master branch protected, this will ensure the CI never fails on master (because only branches with green CI can be merged).

The new lint job is also a bit overkill: now the project is checked out twice and build twice. The arguments can be put below the test, like so: https://github.com/scylladb/scylla-rust-driver/blob/2a7295b466211972d1ebea4dbfff7af2c9935910/.github/workflows/rust.yml#L28.

True, they can be executed serially.