Sync lint config and CI with bootc-dev conventions#15
Sync lint config and CI with bootc-dev conventions#15henrywang merged 1 commit intobootc-dev:mainfrom
Conversation
Goal is just reducing CI drift. Assisted-by: OpenCode (Claude claude-opus-4-6) Signed-off-by: Colin Walters <walters@verbum.org>
There was a problem hiding this comment.
Code Review
The pull request effectively synchronizes linting configurations and CI processes with bootc-dev conventions, enhancing code quality and development workflow. The introduction of global lint settings in Cargo.toml and the Justfile for streamlined task execution are positive changes. The refactoring of error handling in src/lib.rs also improves code clarity and addresses specific clippy warnings.
| if command -v cargo-nextest &>/dev/null; then | ||
| cargo nextest run --all-features | ||
| else | ||
| cargo test --all-targets --all-features | ||
| fi | ||
| # https://github.com/rust-lang/cargo/issues/6669 | ||
| cargo test --doc --all-features |
There was a problem hiding this comment.
The cargo test --doc --all-features command is currently executed unconditionally. However, cargo test --all-targets --all-features already includes doc tests. To avoid redundant execution of doc tests when cargo-nextest is not installed, the cargo test --doc --all-features command should be moved inside the if block, so it only runs when cargo-nextest is used for other tests.
if command -v cargo-nextest &>/dev/null; then
cargo nextest run --all-features
# https://github.com/rust-lang/cargo/issues/6669
cargo test --doc --all-features
else
cargo test --all-targets --all-features
fi
Add [lints.rust] and [lints.clippy] sections to Cargo.toml matching the bootc lint policy. Replace the hardcoded ACTIONS_LINTS_TOOLCHAIN pin (1.86.0) with bootc-dev/actions/setup-rust which uses stable Rust. Add semver-checks job and a Justfile for local development.
Fix clippy::io_other_error warnings by using Error::other() instead of Error::new(ErrorKind::Other, ...). Remove the redundant #![forbid(unsafe_code)] attribute from lib.rs since unsafe_code=forbid is now configured in Cargo.toml.
Assisted-by: OpenCode (Claude claude-opus-4-6)