-
Notifications
You must be signed in to change notification settings - Fork 58
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
Implement Ord
for Severity
#335
Comments
I'm not sure this is even necessary, there is already a doc-test for this that passes: codespan/codespan-reporting/src/diagnostic.rs Lines 12 to 19 in 8d1762e
https://github.com/brendanzab/codespan/runs/3300809770#step:4:247 But sure, if that doesnt work, it can be added, since its already intended anyway. |
I believe that |
resolved with 5909730 |
This would allow determining the max severity as
diagnostics.iter().map(|d| d.severity).max()
. As is, there is no way (except manually matching) to determine whether there were diagnostics over a certain severity (eg., to fail if an error is reported but proceed if there are only warnings).The text was updated successfully, but these errors were encountered: