Skip to content

Sync lint config and CI with bootc-dev conventions#15

Merged
henrywang merged 1 commit intobootc-dev:mainfrom
cgwalters:ci-sync
Mar 9, 2026
Merged

Sync lint config and CI with bootc-dev conventions#15
henrywang merged 1 commit intobootc-dev:mainfrom
cgwalters:ci-sync

Conversation

@cgwalters
Copy link
Collaborator

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)

Goal is just reducing CI drift.

Assisted-by: OpenCode (Claude claude-opus-4-6)
Signed-off-by: Colin Walters <walters@verbum.org>
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

Comment on lines +9 to +15
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

Choose a reason for hiding this comment

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

medium

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

@henrywang henrywang merged commit 1ec4169 into bootc-dev:main Mar 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants