Skip to content

ci(lint): pin ruff and Rust toolchain, fix resulting lint errors - #94

Closed
singlerider wants to merge 1 commit into
blacklanternsecurity:devfrom
singlerider:fix/ci-pin-lint-toolchain
Closed

singlerider wants to merge 1 commit into
blacklanternsecurity:devfrom
singlerider:fix/ci-pin-lint-toolchain

Conversation

@singlerider

Copy link
Copy Markdown

What

  • Pin ruff to 0.16.9 in the lint job and the dev dependency group (uv.lock updated).
  • Pin Rust 1.97.1 with clippy and rustfmt in a new rust-toolchain.toml and in rust-tests.yml.
  • Fix the 8 ruff errors (import order, __slots__ sort, SIM102, SIM201) and the clippy for_kv_map error in src/node/base.rs.

Why

#92 fails required lint and test checks for reasons outside its diff: unpinned pipx install ruff picked up 0.16.9, and floating stable clippy added for_kv_map. Unblocks #92 for blacklanternsecurity/bbot-enterprise#149.

Validation

Before (on dev):

$ uvx ruff@0.16.9 check
Found 8 errors.
$ cargo clippy --all-targets --all-features -- -D warnings
error: you seem to want to iterate on a map's values
  --> src/node/base.rs:42:27

After:

$ uvx ruff@0.16.9 check
All checks passed!
$ cargo fmt --all -- --check && cargo clippy --all-targets --all-features -- -D warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.55s
$ cargo test --all-features
test result: ok. 72 passed; 0 failed; 2 ignored
test result: ok. 9 passed; 0 failed; 0 ignored
$ uv run pytest -q --disable-warnings .
14 passed in 0.73s

AI-assisted (Jcode).

The lint job ran an unpinned `pipx install ruff`, which picked up 0.16.9
and failed on 8 pre-existing errors (import order, __slots__ sort,
SIM102, SIM201). The Rust job tracked `stable`, whose clippy now denies
for_kv_map in src/node/base.rs. Both blocked unrelated PRs such as blacklanternsecurity#92.

Pin ruff==0.16.9 in the workflow and dev group, pin Rust 1.97.1 with
clippy and rustfmt in rust-toolchain.toml and rust-tests.yml, and fix
the errors in source.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100%. Comparing base (e26e924) to head (626795f).

Additional details and impacted files
@@         Coverage Diff         @@
##            dev    #94   +/-   ##
===================================
  Coverage   100%   100%           
===================================
  Files         3      3           
  Lines       604    605    +1     
===================================
+ Hits        604    605    +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@singlerider

Copy link
Copy Markdown
Author

Folded into #92.

@singlerider singlerider closed this Oct 3, 2026
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