Repository navigation
Fix CI clippy and audit failures - #3
Merged
Merged
Conversation
Clippy 1.98 reports needless_doctest_main on the permanent error and retry doctests. Rustdoc wraps a doctest in main on its own, so the explicit wrapper is not needed. The doctests keep the same behavior.
cargo audit fails the CI audit job on seven advisories. All come in through the reqwest dev-dependency. Update the affected crates to patched versions within their semver range: - bytes 1.10.1 -> 1.12.1 (RUSTSEC-2026-0007) - h2 0.4.12 -> 0.4.19 (RUSTSEC-2026-0258) - rustls 0.23.34 -> 0.23.45 (RUSTSEC-2026-0285) - rustls-webpki 0.103.7 -> 0.103.15 (RUSTSEC-2026-0049, RUSTSEC-2026-0098, RUSTSEC-2026-0099, RUSTSEC-2026-0104) Cargo ignores the Cargo.lock of a dependency, so this change does not affect users.
The retry doctest fetches https://www.rust-lang.org. When that request fails, retry keeps trying for up to 15 minutes, the default max_elapsed_time. The CI job times out after 10 minutes, so a network problem would make the job hang until that timeout. Mark the doctest no_run, like the permanent error doctest. It still compiles in tests but makes no request.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI failed on master in run 35845927658. The Lint and Test job and the Audit job failed for separate reasons. The first two commits fix one each. The third commit removes a network request from the tests.
Lint and Test: clippy
needless_doctest_mainClippy reports
needless_doctest_mainon the permanent error and retry doctests insrc/lib.rs. Clippy 1.96.1 and 1.98.1 report it. Clippy 1.85, which the dev shell pins, and 1.89 do not.The lint fires because seven crate doc lines have no space after
//!(lines 12, 15, and 22 to 26). Rustdoc then strips no leading space from the crate docs, so each code block keeps a one-space indent. When a fenced code block has an indent, the Markdown parser emits each line as its own text event. Clippy checks each text event on its own, and the linefn main() {alone matches the lint.The first commit removes the
fn mainwrappers. Rustdoc addsmainaround a doctest by itself, so the doctests behave the same. This fix works with every clippy version. Adding the missing spaces would also silence the lint, but only because of how clippy splits the text.Audit: vulnerable crates in
Cargo.lockcargo auditfound seven vulnerabilities. All come in through thereqwestdev-dependency. The second commit updates the affected crates to patched versions within their semver range:bytesh2rustlsrustls-webpkiCargo ignores the
Cargo.lockof a dependency, so this change does not affect users.The "Security audit" check is the check run that
rustsec/audit-checkcreates. It passes when the Audit job passes.These audit warnings remain, but they do not fail the job:
async-stdandbincodeare unmaintained.rand0.9.2 andevent-listener5.4.1 are unsound.Retry doctest: no network request
The retry doctest fetched
https://www.rust-lang.orgincargo test. When that request fails, retry keeps trying for up to 15 minutes, but the CI job times out after 10 minutes. The third commit marks the doctestno_run, like the permanent error doctest. It still compiles in tests.Testing
I ran each CI step locally with Rust 1.98.1:
cargo clippy --all-targets --features tokio -- -D warningscargo clippy --all-targets --target wasm32-unknown-unknown -- -D warningscargo test --features tokiocargo test --doccargo audit(no vulnerabilities, 4 warnings)Extra checks outside CI:
cargo fmt -- --check, from thelintrecipe in the justfile.