Skip to content

[audit] dead-code: unused Tauri commands list_watchers and stop_all_watchers #588

@github-actions

Description

@github-actions

Finding

Two Tauri commands are registered in generate_handler! but never invoked from the frontend:

  • stop_all_watcherssrc-tauri/src/watcher.rs:235, registered at src-tauri/src/lib.rs:492
  • list_watcherssrc-tauri/src/watcher.rs:247, registered at src-tauri/src/lib.rs:493

Grep across src/ for invoke("list_watchers") and invoke("stop_all_watchers") returns zero matches.

Impact

These commands add surface area to the IPC bridge without being consumed. They compile and are callable by any webview code, but nothing exercises them.

Suggested fix

Either:

  1. Remove the commands and their generate_handler! registrations if they're not needed
  2. Gate them behind #[cfg(debug_assertions)] if they're intended as debug/diagnostics helpers, and document that intent

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    auditCodebase audit findingdead-codeDead or unreachable code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions