[clang] [clang-tools-extra] [clang-tidy] Add SARIF output to clang-tidy (PR #219182)
Valentyn Yukhymenko via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 26 13:16:28 PDT 2026
================
@@ -351,14 +351,16 @@ void SarifDocumentWriter::createRun(StringRef ShortToolName,
// Signify a new run has begun.
Closed = false;
- json::Object Tool{
- {"driver",
- json::Object{{"name", ShortToolName},
- {"fullName", LongToolName},
- {"language", "en-US"},
- {"version", ToolVersion},
- {"informationUri",
- "https://clang.llvm.org/docs/UsersManual.html"}}}};
+ StringRef InformationUri = "https://clang.llvm.org/docs/UsersManual.html";
+ if (LongToolName == "clang-tidy")
----------------
BaLiKfromUA wrote:
**nit:** I'm not sure whether it's the right approach to hardcode "clang-tidy" in the clang module.
Maybe passing `InformationUri` explicitly (or leaving it empty so the default value is the Clang user manual link) is a cleaner solution here.
Yes, we might change callers, but IMO it should be better.
Are there any other parts of Clang that are doing something similar?
https://github.com/llvm/llvm-project/pull/219182
More information about the cfe-commits
mailing list