[PATCH] D53982: Output "rule" information in SARIF

George Karpenkov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 1 09:50:38 PDT 2018


george.karpenkov requested changes to this revision.
george.karpenkov added a comment.
This revision now requires changes to proceed.

Minor nit: let's create a custom substitution for your diff command, like `diff_plist`.
Otherwise LGTM.



================
Comment at: test/Analysis/diagnostics/sarif-multi-diagnostic-test.c:1
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.security.taint,debug.TaintTest %s -verify -analyzer-output=sarif -o - | diff -U1 -w -I ".*file:.*sarif-multi-diagnostic-test.c" -I '"version":' -I "2\.0\.0\-csd\.[0-9]*\.beta\." - %S/Inputs/expected-sarif/sarif-multi-diagnostic-test.c.sarif
+#include "../Inputs/system-header-simulator.h"
----------------
In order to avoid duplication in `diff` commands between the tests, it might be better to define a custom command in `lit.cfg`, as we did for `diff_plist`
(alternatively, create a custom flag to generate stable output)


https://reviews.llvm.org/D53982





More information about the cfe-commits mailing list