Skip to content

Commit

Permalink
.sync/rust_config/Makefile.toml: Add check task (#241)
Browse files Browse the repository at this point in the history
The VS Code `rust-analyzer` plugin uses `cargo check` to find
problems. We use custom flags/target info with `cargo make`.

This adds a `cargo make check` command that reuses similar
flags to our build so the check results are similar. `check_json`
is added to be used by tools like VS Code that need JSON
output.

Signed-off-by: Michael Kubacki <[email protected]>
  • Loading branch information
makubacki authored Sep 15, 2023
1 parent 67df77c commit bdffdb2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .sync/rust_config/Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ clear = true
command = "cargo"
args = ["build", "@@split(PACKAGE_TARGET, )", "@@split(BUILD_FLAGS, )"]

[tasks.check]
description = "Checks rust code for errors. Example `cargo make check`"
clear = true
command = "cargo"
args = ["check", "@@split(PACKAGE_TARGET, )", "@@split(BUILD_FLAGS, )"]

[tasks.check_json]
description = "Checks rust code for errors with results in JSON. Example `cargo make check_json`"
clear = true
command = "cargo"
args = ["check", "@@split(PACKAGE_TARGET, )", "@@split(BUILD_FLAGS, )", "--message-format=json"]

[tasks.test]
description = "Builds all rust tests in the workspace. Example `cargo make test`"
clear = true
Expand Down

0 comments on commit bdffdb2

Please sign in to comment.