Skip to content

ci: Sync Rust linting checks from bootc-dev/bootc#3577

Merged
cgwalters merged 6 commits intoostreedev:mainfrom
henrywang:add-fmt
Mar 31, 2026
Merged

ci: Sync Rust linting checks from bootc-dev/bootc#3577
cgwalters merged 6 commits intoostreedev:mainfrom
henrywang:add-fmt

Conversation

@henrywang
Copy link
Copy Markdown
Collaborator

@henrywang henrywang commented Mar 31, 2026

  • Extend cargo fmt and cargo clippy checks to cover all Rust crates (tests/inst, tests/bootc-integration, tests/xtask), not just the ostree workspace
  • Sync clippy lint config from bootc-dev/bootc's validate target: make clippy gating with -D clippy::correctness -D clippy::suspicious -Dunused_imports -Ddead_code
  • Add cargo doc with -D warnings to catch rustdoc issues
  • Add just validate, just cargo-fmt-check, and just cargo-clippy targets for local development
  • Fix existing lint issues: cargo fmt in tests/xtask, dead code in tests/inst, missing v2024_7 feature in Cargo.toml, and broken intra-doc links in rust-bindings/src/repo.rs

henrywang and others added 2 commits March 31, 2026 11:30
The existing cargo fmt check only covered the ostree workspace package.
Add fmt checks for the standalone test crates (tests/inst,
tests/bootc-integration, tests/xtask) which are separate workspaces.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
Align with bootc's validate target:
- Make cargo clippy gating (was "non-gating") with the same lint config
  as bootc (-A clippy::all -D clippy::correctness -D clippy::suspicious
  -Dunused_imports -Ddead_code)
- Extend clippy to cover test crates (tests/inst, tests/bootc-integration,
  tests/xtask)
- Add cargo doc with -D warnings to catch rustdoc issues

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Mar 31, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

henrywang and others added 4 commits March 31, 2026 12:06
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
These structs were never constructed, flagged by cargo clippy with
-Ddead_code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
Add just targets mirroring the CI Rust checks so developers can run
them locally before pushing:
- validate: runs both fmt and clippy checks
- cargo-fmt-check: checks formatting across all crates
- cargo-clippy: runs clippy with the same lint config as CI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
…eature

- Replace inline cargo fmt/clippy commands in rust.yml with just
  cargo-fmt-check and just cargo-clippy for consistency with local dev
- Make Justfile cargo-clippy use CARGO_PROJECT_FEATURES env var
  (defaults to v2022_6) so CI and local use share the same config
- Add missing v2024_7 feature to Cargo.toml to fix cargo doc failure
  caused by unexpected cfg condition

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
@github-actions github-actions bot added the area/rust-bindings Relates to the Rust bindings for the C library label Mar 31, 2026
@henrywang henrywang changed the title ci: Add comprehensive Rust linting and formatting checks ci: Sync Rust linting checks from bootc-dev/bootc Mar 31, 2026
@henrywang henrywang marked this pull request as ready for review March 31, 2026 08:32
@henrywang henrywang requested a review from cgwalters March 31, 2026 15:45
@cgwalters cgwalters merged commit 6c16922 into ostreedev:main Mar 31, 2026
43 of 46 checks passed
@henrywang henrywang deleted the add-fmt branch April 1, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/rust-bindings Relates to the Rust bindings for the C library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants