Skip to content

lint: keep the error in tools/ci, tools/testing, tools/api and examples (part of #13801) - #14222

Merged
TrapsterDK merged 1 commit into
mainfrom
issue-13801-tools-ci-testing
Nov 20, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
issue-13801-tools-ci-testing

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Part of #13801.

Changes

  • tools/ci, tools/testing, tools/api: every map_err(|_| ..) now appends : {error} to its existing message. Statement-position .ok() on write! into a String becomes push_str(&format!(..)).
  • tools/testing/hermetic/src/lib.rs: timeline uses eprintln! when the write fails.
  • tools/testing/nested/src/lib.rs: the Windows remove_dir fallback returns an io::Error that keeps the original kind and both messages.
  • tools/testing/starlark_harness.rs: finish returns io::Result<i32>, and main maps Err to ExitCode::FAILURE, so exit codes stay the same. The broken-stdout test now asserts Err.
  • tools/testing/process_probe: adds a T::Err: Display bound.
  • Crate roots in tools/ci, tools/testing and tools/api deny clippy::map_err_ignore and clippy::unused_result_ok.
  • examples/ gets the fixes but no deny attribute:
    • CommandError::BadId gains a ParseIntError field. This is a public API change in the example.
    • parse_board advances a u32 id with checked_add.
    • consumer_test uses eprintln!.

Testing

  • tools/dx lint //tools/ci/... //tools/testing/... //tools/api/... //examples/shared-rust:{tasks_model,tasks_core,tasks} //examples/adopt-polyglot:consumer_test: no findings for either lint. The only error is clippy::absurd_extreme_comparisons in tools/ci/determinism_allowlist_test.rs, which this PR does not touch. I reran it with both -D flags added to .bazelrc locally (not committed) and got the same result.
  • //examples/... as a whole fails analysis on main, for reasons unrelated to this PR: tasks_interface clang aspect and the rules_go toolchain for tasks_wasi.
  • tools/dx test on the 13 named targets: 12 passed. //tools/ci:lint_attributes_test fails on cli/codegen_shard/src/writer.rs: drop(writeln!(..)) discards the write error. This PR does not touch that file.
  • Not run locally: the Windows-only appcontainer_run and isolation_windows_probe, and the nested-Bazel/consumer tests (including //examples/adopt-polyglot:consumer_test). CI covers them.

Remaining on #13801

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K

…es (part of #13801)

Every map_err(|_| ..) in these trees appends the original error, and every
statement-position .ok() either writes into a String with push_str, reports
the failure, or propagates it. starlark_harness::finish now returns
io::Result<i32>; main maps Err to FAILURE, so exit codes stay the same.
Crate roots in tools/ci, tools/testing and tools/api deny
clippy::map_err_ignore and clippy::unused_result_ok.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K
@TrapsterDK
TrapsterDK merged commit 08677cd into main Nov 20, 2026
3 of 4 checks passed
@TrapsterDK
TrapsterDK deleted the issue-13801-tools-ci-testing branch November 20, 2026 11:24
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.

1 participant