[PATCH] D53814: Allow the analyzer to output to a SARIF file

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 30 11:58:37 PDT 2018


aaron.ballman closed this revision.
aaron.ballman added a comment.

In https://reviews.llvm.org/D53814#1280581, @george.karpenkov wrote:

> I much prefer this version.
>  We've had the same problem with diffing plist output.
>  One thing we have learned is using a FileCheck was definitely a bad idea, as it leads to unreadable, unmaintainable, and very hard to update tests,
>  so either diff or your custom tool is way better.
>
> As for the ultimate solution, I'm still not sure: I agree that maintaining those `-I` flags is annoying.


We can go with this approach until we need something more complicated. I suspect that as we add SARIF features, we may want to bring back the Python script for handling things like "Does every file in the 'files' list appear only once and do the files listed correspond exactly to ones in the diagnostic locations?". Diff definitely won't handle that sort of thing.

> One option is having an extra flag to produce "stable" output, which does not include absolute URLs/versions/etc.

Worth thinking about. SARIF has the ability to output relative paths as well as absolute paths. It also has the notion of redacted paths so that you can remove sensitive information from analysis reports. So there's plenty of room for changes here.

Thank you for the reviews! I've commit in r345628.


https://reviews.llvm.org/D53814





More information about the cfe-commits mailing list