Skip to content

rust: deny unused_result_ok and map_err_ignore in core/quality adapter and runner (part of #13801) - #13987

Merged
TrapsterDK merged 1 commit into
mainfrom
cloud/13801-quality
Nov 19, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
cloud/13801-quality

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Part of #13801.

  • core/quality/adapter and core/quality/runner (lib, main, matrix_harness): clippy::map_err_ignore and clippy::unused_result_ok are denied at each crate root.
  • Each map_err(|_| ..) now binds the error and adds it to the end of the existing message.
  • write!(String, ..).ok() is now push_str(&format!(..)). The shim bytes are unchanged.
  • RunnerError::InvalidUtf8 has a new reason field. Outside matches use { .. }, and only this crate builds the variant.
  • Tests that pin these messages are updated: numbered now expects the parse error for both the empty and the non-numeric case, and the InvalidUtf8 tests in lib_pipeline.rs and real_core.rs expect the reason. real_core, real_fixtures, real_tools and real_delegated now import fmt::Write themselves, because they used to get it through real.rs.

Tested locally:

  • tools/dx test //core/quality/adapter/... //core/quality/runner/...: 5/5 passed.
  • tools/dx check --apply --affected: no map_err_ignore or unused_result_ok findings. The remaining findings are in files this PR doesn't change (cli/, deploy/private/release, tools/ci, examples/, biome.rs, scalafix.rs, check.rs).
  • tools/dx test --affected: 25 passed, 1 failed. The failure is //core/quality/testdata:matrix_text_typos_fail, and it fails on main too: its fixture text "say the word\n" in runner_matrix_file_family.bzl no longer has a typo in it.
  • Nested-Bazel and consumer tests were not run locally.

Remaining on #13801: tools/ci, tools/testing, deploy/private/**, examples/, then the .bazelrc flags (that last step also waits on #13800). The other crates are tracked in #13981.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K

@TrapsterDK TrapsterDK added the needs-review Touches review paths; needs a second-session Review: comment label Nov 19, 2026
…r and runner (part of #13801)

Bind each ignored error and append it to the existing message, replace
write!(String, ..).ok() with push_str(&format!(..)), give
RunnerError::InvalidUtf8 a reason field, and deny both lints at each
crate root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K
@TrapsterDK
TrapsterDK merged commit 0f5fced into main Nov 19, 2026
4 checks passed
@TrapsterDK
TrapsterDK deleted the cloud/13801-quality branch November 19, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Touches review paths; needs a second-session Review: comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant