#cargo-toml #cargo #targets #unused #find #testing

app cargo-utests

Find unused test targets in Cargo.toml

1 unstable release

0.1.0 Oct 26, 2023

#461 in Cargo plugins

MIT/Apache

10KB
62 lines

TODO

  • Precise mode: ensure 100% correctness via e.g., cargo nextest list --message-format json / cargo test --all-targets -- --list -Zunstable-options --format json. This need to compile the crate.
  • Automatic fix
  • Quick mode: simply search #[test]. If not found, we mark test = false for all the crate's targets (lib, bin, example, bench).
    • This is less precise, because even if some tests are found, some targets e.g., bin doesn't necessarily need to be tested. However, it can be complicated to determine. e.g., when autobins = false, or when a binary contains submodules.
  • Support also doctests and benchmarks.

Dependencies

~2.7–4MB
~73K SLoC