Displaying compiler diagnostics via SARIF uploads #157136
Replies: 3 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
Ping @chrisgavin , who's on call. |
Beta Was this translation helpful? Give feedback.
-
I think these two things are now implemented.
This might or might not be affected by
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Product Feedback
Body
Hello.
There's currently a bit of a push to switch
from old-school textual compiler diagnostics,
to a more user-friendly diagnostics powered by SARIF,
so that they can be nicely integrated into IDE/tools.
Github already provides a way to upload results of an
analysis in SARIF format, and they will be displayed as
new security issues. I've tried, and this is //almost// sufficient
to also handle compiler diagnostics, but not quite.
There's just one thing missing:
Unfortunately, the issues from SARIF are only posted
as in-line comments IFF the lines they appear on are in the diff.
This is, unfortunately, very obviously wrong.
Consider: https://godbolt.org/z/9MqY9rrP9
(I'm also not sure if only new issues are posted, or all are?)
(In the same vein, it would be nice if the CodeQL analysis
itself had an
-Werrorswitch, i.e. fail if any issues were found...)This does not seem like an ovely complex issue,
and solving that seems like the only blocker from Github side,
so, please, consider supporting displaying in-line diags on lines not-in-diff? :)
(There's an edge-case: some files might not exist in the repo at all.
I'm not sure how their diags should be handled.)
Concretely, i think this can be viewed as the following enhancements:
fail-if-any-issues-found(aka-Werror) option togithub/codeql-action/upload-sarif,to fail the step if the uploaded SARIF had any issues,
regardless of whether or not they are preexisting or not.
github/codeql-action/analyzeThey would probably need to be posted as normal comments in the PR.
There's also the tooling question - there is no nice way
to get the compiler to produce those SARIF's in a predictable way,
and then they need to be merged into a single SARIF.
I've hacked something together: darktable-org/rawspeed#798
but probably build systems might need to handle that...
Roman.
Beta Was this translation helpful? Give feedback.
All reactions