Skip to content

fix(lint): resolve all clippy warnings workspace-wide#207

Merged
Shooksie merged 1 commit intomainfrom
fix/check-clippy-fmt
Apr 1, 2026
Merged

fix(lint): resolve all clippy warnings workspace-wide#207
Shooksie merged 1 commit intomainfrom
fix/check-clippy-fmt

Conversation

@Shooksie
Copy link
Copy Markdown
Contributor

@Shooksie Shooksie commented Apr 1, 2026

Summary

  • Fixed all cargo clippy --workspace --all-targets warnings — zero warnings remaining
  • cargo fmt --check passes clean throughout
  • No pre-existing test failures introduced

Changes

Cargo.toml: Updated renamed lints option_map_unwrap_or/option_map_unwrap_or_elsemap_unwrap_or

Code fixes across 23 files:

  • lines_filter_map_ok: .flatten().map_while(Result::ok) (orchestrator-logging, orchestrator-cli)
  • unnecessary_map_or: .map_or(true, ...).is_none_or(...) (orchestrator-logging)
  • redundant_pattern_matching: if let Err(_) = ....is_err() (protocol)
  • needless_return: removed bare return in last match arm (agent-runner)
  • new_without_default: added Default impls for Supervisor and RunnerMetrics (agent-runner)
  • bool_comparison: == false!expr (protocol)
  • needless_question_mark: Ok(x?)x (orchestrator-core)
  • collapsible_if, explicit_iter_loop, unnecessary_cast, unnecessary_unwrap (oai-runner)
  • unnecessary_lazy_evaluations: unwrap_or_else(|| x)unwrap_or(x) (workflow-runner-v2)
  • single_char_add_str: push_str("\n")push('\n') (orchestrator-cli ops_now)
  • Removed unused imports in test modules (ops_queue, ops_workflow)
  • Added #![allow(clippy::await_holding_lock)] to 8 test modules that intentionally hold a std::Mutex env-lock across awaits for test serialization

Test plan

  • cargo fmt --check — clean
  • cargo clippy --workspace --all-targets — zero warnings
  • Unit tests pass (pre-existing failures in orchestrator-config and one flaky test in orchestrator-core are unrelated to this PR and reproduce on main)

🤖 Generated with Claude Code

- Rename deprecated `option_map_unwrap_or`/`option_map_unwrap_or_else` lints
  to `map_unwrap_or` in workspace Cargo.toml
- Fix `lines_filter_map_ok`: replace `.flatten()` with `.map_while(Result::ok)`
  in orchestrator-logging and orchestrator-cli
- Fix `unnecessary_map_or`: use `is_none_or` in orchestrator-logging filters
- Fix `redundant_pattern_matching`: use `.is_err()` in protocol
- Fix `needless_return`: remove bare `return` in agent-runner lock
- Add `Default` impls for `Supervisor` and `RunnerMetrics` in agent-runner
- Fix `bool_comparison`: use `!expr` instead of `expr == false` in protocol
- Fix `needless_question_mark`: unwrap `Ok(x?)` to `x` in orchestrator-core
- Fix `collapsible_if` and `explicit_iter_loop` in oai-runner agent_loop
- Fix `unnecessary_cast` and `unnecessary_unwrap` in oai-runner
- Fix `unnecessary_lazy_evaluations`: use `unwrap_or` in workflow-runner-v2
- Fix `single_char_add_str`: use `push('\n')` in ops_now
- Remove unused imports in ops_queue and ops_workflow test modules
- Suppress intentional `await_holding_lock` in test modules that use a
  std Mutex for test serialization (env locks), not for async coordination

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Shooksie Shooksie merged commit b6f5686 into main Apr 1, 2026
24 checks passed
This was referenced Apr 8, 2026
Shooksie added a commit that referenced this pull request Apr 8, 2026
All CI checks pass. Lint cleanup - zero clippy warnings workspace-wide.
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