diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-15 00:35:50 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-15 00:35:50 +0100 |
commit | b495e56b0d3f7a72494d002a69440563e8394574 (patch) | |
tree | e3d061a29bfdff9ac145d5e94b7f6ffc27080398 /crates/ra_hir_ty/src | |
parent | c82e7696e6f86cc0843c5aab9f09b5d6dd0d4bac (diff) | |
parent | 6be972770e75db5ec9f9ae2504786a9d7e957e4a (diff) |
Merge #3971
3971: add diagnostics subcommand to rust-analyzer CLI r=JoshMcguigan a=JoshMcguigan
This PR adds a `diagnostics` subcommand to the rust-analyzer CLI. The intent is to detect all diagnostics on a workspace. It returns a non-zero status code if any error diagnostics are detected. Ideally I'd like to run this in CI against the rust analyzer project as a guard against false positives.
```
$ cargo run --release --bin rust-analyzer -- diagnostics .
```
Questions for reviewers:
1. Is this the proper way to get all diagnostics for a workspace? It seems there are at least a few ways this can be done, and I'm not sure if this is the most appropriate mechanism to do this.
2. It currently prints out the relative file path as it is collecting diagnostics, but it doesn't print the crate name. Since the file name is relative to the crate there can be repeated names, so it would be nice to print some identifier for the crate as well, but it wasn't clear to me how best to accomplish this.
Co-authored-by: Josh Mcguigan <[email protected]>
Diffstat (limited to 'crates/ra_hir_ty/src')
0 files changed, 0 insertions, 0 deletions