Skip to content

style(clippy): fix test file lints (zombie_processes, empty_line_after_doc_comment, useless_format, unused_variable)#674

Merged
jamesadevine merged 1 commit into
mainfrom
clippy-fixer/test-file-lints-2026-05-21-233bd1c5465a58c3
May 21, 2026
Merged

style(clippy): fix test file lints (zombie_processes, empty_line_after_doc_comment, useless_format, unused_variable)#674
jamesadevine merged 1 commit into
mainfrom
clippy-fixer/test-file-lints-2026-05-21-233bd1c5465a58c3

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What clippy found

Running cargo clippy --all-targets --all-features --workspace -- -D warnings reported four findings in the test files:

error: empty line after doc comment
  --> tests/mcp_http_tests.rs:9:1

error: spawned process is not `wait()`ed on in all code paths
  --> tests/mcp_http_tests.rs:56:21
  note: this if expression has a `wait()` call, but it is missing an else block
  --> tests/mcp_http_tests.rs:84:9

error: unused variable: `output_yaml`
  --> tests/compiler_tests.rs:46:9

error: useless use of `format!`
  --> tests/compiler_tests.rs:3733:24
  help: consider using `.to_string()`: `"\"source\":\"".to_string()`

How it was fixed

Lint File Fix
clippy::empty_line_after_doc_comment tests/mcp_http_tests.rs Changed module-level /// to // — the block describes the test module, not a specific item, so // is correct
clippy::zombie_processes tests/mcp_http_tests.rs Added child.wait().ok() after child.kill().ok() before the panic! so all code paths reap the child process
clippy::unused_variables tests/compiler_tests.rs Prefixed output_yaml with _ to signal intentional non-use
clippy::useless_format tests/compiler_tests.rs Replaced &format!("\"source\":\"") with the string literal "\"source\":\"" directly

Verification

  • cargo build --all-targets: ✅ succeeded
  • cargo test --test mcp_http_tests: ✅ 8 passed, 0 failed
  • cargo test --test compiler_tests: ✅ 116 passed, 0 failed
  • cargo clippy --all-targets --all-features --workspace -- -D warnings: ✅ no new warnings in the changed files

Generated by Clippy Fixer · ● 10.3M ·

…r_doc_comment, useless_format, unused_variable)

- tests/mcp_http_tests.rs: change module-level /// to // to fix
  empty_line_after_doc_comment; add child.wait().ok() before panic
  to fix zombie_processes (all code paths must wait on spawned child)
- tests/compiler_tests.rs: prefix unused output_yaml with _ to fix
  fix useless_format

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