Commit 8b0b9e8
committed
fix(clippy): allow dead_code on find_node_dirs_sync for non-macOS targets
The function is only called from `#[cfg(target_os = "macos")]` blocks
in `get_global_node_modules_paths` (Homebrew / nvm / volta / fnm
fallbacks) and from inline `#[cfg(test)] mod tests` entries.
On Linux/Windows clippy sees no production caller and trips
`-D dead_code` under `cargo clippy --workspace --all-features --
-D warnings` (CI's invocation). Gating the function itself to
`target_os = "macos"` would break the inline tests on Linux.
`#[allow(dead_code)]` is the right tool: keeps the symbol visible
on every target while clippy treats it as intentionally unused.
Surfaced by CI run 26332596376 on PR #80; local clippy on macOS
host passes either way because the macOS callers are live there.
Assisted-by: Claude Code:claude-opus-4-71 parent 68a9753 commit 8b0b9e8
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
200 | 207 | | |
201 | 208 | | |
202 | 209 | | |
| |||
0 commit comments