[PATCH] D55792: Allow direct navigation to static analysis checker documentation through SARIF exports
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 17 14:39:16 PST 2018
aaron.ballman created this revision.
aaron.ballman added reviewers: NoQ, george.karpenkov, Szelethus, dcoughlin, dkrupp.
Herald added subscribers: jfb, rnkovacs.
The static analysis checkers are mostly listed on two pages, one for alpha checks and one for released checks (there are also a considerable number of undocumented analyzer checkers). This patch adds anchors to all of the documented checks so that you can directly link to a check by a stable name. This is useful because the SARIF file format has a field for specifying a URI to documentation for a rule and some viewers, like CodeSonar, make use of this information.
This patch exposes those anchors through the SARIF exporter, which requires an automated way to determine the check URIs. Checkers.td now requires each checker to be annotated with an extensible list of documentation kinds (listed in CheckerBase.td) that map to physical URI paths on the static analyzer web page if the check has documentation (mapping is done by the table generator), which is exposed via the `CHECKER` macro. When exporting to SARIF, the checker name itself is used as the anchor target on the page (and I verified that checker names, including dots and dashes, will be valid anchors) and the corresponding edits were made to each HTML file to add the anchors.
This likely has some overlap with D54429 <https://reviews.llvm.org/D54429>, so I've added those reviewers and author to this review.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 114545 bytes
Desc: not available
More information about the cfe-commits