Skip to content

refactor(clippy): collapse nested if blocks across multiple files#711

Merged
jamesadevine merged 1 commit into
mainfrom
clippy-fixer/collapsible-if-20260523-1c1aba1059f21365
May 23, 2026
Merged

refactor(clippy): collapse nested if blocks across multiple files#711
jamesadevine merged 1 commit into
mainfrom
clippy-fixer/collapsible-if-20260523-1c1aba1059f21365

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What clippy found

clippy::collapsible_if fired 8 times across 6 files:

error: this `if` statement can be collapsed
   --> src/compile/filter_ir.rs:635:5
error: this `if` statement can be collapsed
  --> src/compile/pr_filters.rs:33:5
error: this `if` statement can be collapsed
  --> src/compile/pr_filters.rs:51:5
error: this `if` statement can be collapsed
   --> src/logging.rs:101:13
error: this `if` statement can be collapsed
    --> src/mcp.rs:1528:17
error: this `if` statement can be collapsed
   --> src/runtimes/dotnet/extension.rs:113:9
error: this `if` statement can be collapsed
   --> src/runtimes/dotnet/extension.rs:123:9
error: this `if` statement can be collapsed
  --> src/update_check.rs:29:13

How it was fixed

Lint: clippy::collapsible_if
Fix: Collapse if outer { if inner { ... } } into a single if outer && inner { ... } (using && let-chain syntax where needed).

Files touched:

  • src/compile/filter_ir.rs
  • src/compile/pr_filters.rs
  • src/logging.rs
  • src/mcp.rs
  • src/runtimes/dotnet/extension.rs
  • src/update_check.rs

Verification

  • cargo build --all-targets
  • cargo test ✅ (all tests pass)
  • cargo clippy --all-targets --all-features --workspace -- -D warnings — all 8 collapsible_if errors resolved ✅

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • dev.azure.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "dev.azure.com"

See Network Configuration for more information.

Generated by Clippy Fixer · ● 14.3M ·

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine marked this pull request as ready for review May 23, 2026 06:46
@jamesadevine jamesadevine merged commit f116f57 into main May 23, 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.

1 participant