rust/crates
bors[bot] b495e56b0d
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 <joshmcg88@gmail.com>
2020-04-14 23:35:50 +00:00
..
ra_arena Use resize_with 2020-03-31 09:02:12 -04:00
ra_assists Fix PR 2020-04-13 13:59:30 -04:00
ra_cfg Update versions 2020-02-18 16:12:40 +02:00
ra_db Merge #3727 2020-03-26 17:09:32 +00:00
ra_flycheck Centralize defaults 2020-04-01 18:56:47 +02:00
ra_fmt Provide more complete AST accessors to support usage in rustc 2020-04-09 11:50:37 +02:00
ra_hir diagnostics cli, iterate over members 2020-04-14 16:26:03 -07:00
ra_hir_def handle tuple patterns with ellipsis 2020-04-13 08:19:19 -07:00
ra_hir_expand Align grammar for record patterns and literals 2020-04-12 00:00:15 +02:00
ra_hir_ty handle tuple patterns with ellipsis 2020-04-13 08:19:19 -07:00
ra_ide Merge #3955 2020-04-11 22:01:22 +00:00
ra_ide_db Make records grammar more orthogonal 2020-04-11 19:20:41 +02:00
ra_mbe Fix accidently quadratic behavior when processing includes 2020-04-10 19:43:37 +02:00
ra_parser Align grammar for record patterns and literals 2020-04-12 00:00:15 +02:00
ra_proc_macro Introduce ra_proc_macro_srv 2020-04-03 19:01:44 +08:00
ra_proc_macro_srv Improve error handling 2020-04-11 14:53:13 +08:00
ra_prof Move timeit to stdx 2020-04-10 20:46:42 +02:00
ra_project_model Migrate to privacy as per review commets 2020-04-02 21:09:03 +03:00
ra_syntax Align grammar for record patterns and literals 2020-04-12 00:00:15 +02:00
ra_text_edit Remove some TextUnit->usize escapees 2020-03-12 22:33:27 -04:00
ra_tt Improve tt::Subtree debug print 2020-04-10 00:17:32 +08:00
rust-analyzer diagnostics cli, iterate over members 2020-04-14 16:26:03 -07:00
stdx Move timeit to stdx 2020-04-10 20:46:42 +02:00
test_utils Make records grammar more orthogonal 2020-04-11 19:20:41 +02:00