-
Notifications
You must be signed in to change notification settings - Fork 1.9k
C#: Add extraction error diagnostic query #5740
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
csharp/ql/test/library-tests/diagnostics/DiagnosticExtractorErrors.expected
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| from DiagnosticError error | ||
| select error.getMessage(), 3 |
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.
What does the 3 mean?
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.
I think 3 means error in the SARIF format.
| file.fromSource() and | ||
| not exists(ExtractorError e | e.getLocation().getFile() = file) and | ||
| not exists(CompilerError e | e.getLocation().getFile() = file) | ||
| select file, "" |
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.
Is the "" needed?
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.
Yes, it is needed. This is probably how we indicate that these results are success ones. See also here.
This PR adds two diagnostic queries to list extraction errors, and to list files with no extraction errors.
Additionally, it changes the standalone extractor to store extraction errors (model errors). This latter one (if approved) will need a change note.
Differences job