-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
The Cargo maker, as currently defined, will only build/check the main binary or library. To also get errors in additional targets (like other binaries) or in tests, the commands that are run must be tweaked a little. If not using cargo check
, the right command to run is probably cargo test --no-run
, which should build all targets, including tests, but not run anything. When g:ale_rust_cargo_use_check
is set, ALE will currently run cargo check
with no additional flags. However, this will only check non-test code, and only for the library. To test all targets, cargo check --all
should be used.
Unfortunately, --all
does not check tests. rust-lang/cargo#4039 attempts adds --tests
, but still seems to be some way away from landing. --all
is a good half-way point in the meantime though. This is also the conclusion that was reached for neomake in neomake/neomake#843 (comment).