Skip to content

Show errors in Rust test code #626

@jonhoo

Description

@jonhoo

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions