-
Notifications
You must be signed in to change notification settings - Fork 1.9k
add diagnostics subcommand to rust-analyzer CLI #3971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We have a |
I'd be a bit wary about that at this stage, we don't want random PRs to break because they added new code that happens to have a false positive 😬 (Apart from the impact on build times...) Since I don't have a much better approach for getting all diagnostics, I'd be fine with merging this one for now, considering this is just a debug tool anyway at the moment. bors d+ |
|
✌️ JoshMcguigan can now approve this pull request. To approve and merge a pull request, simply reply with |
|
@flodiebold I've changed this quite a bit in my most recent commit based on your suggestions. If you don't mind I'd prefer you take another quick look before I merge. |
This is a good point. My thought was this would run nightly, similar to analysis-stats. |
78a554c to
6be9727
Compare
|
bors r+ |
|
Build succeeded: |
|
|
||
| if found_error { | ||
| println!(); | ||
| Err(anyhow!("diagnostic error detected")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super minor point, but I prefer spelling this as format_err instead (the same macro is exported under two aliases).
This PR adds a
diagnosticssubcommand 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.Questions for reviewers: