[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

Whisperity via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 15 01:09:18 PST 2021


whisperity added a comment.

In D64454#3124423 <https://reviews.llvm.org/D64454#3124423>, @carlosgalvezp wrote:

> I was a bit confused as well about the ClangSA support in clang-tidy. What's the current status? Is clang-tidy running *all* checks from StaticAnalyzer?

If your package is built with CSA enabled, and you don't want to run //Cross Translation Unit// analysis mode, then yeah. After all, both Clang-Tidy and Clang Static Analyser are just "FrontendAction" libraries under the hood.

----

In D64454#3124312 <https://reviews.llvm.org/D64454#3124312>, @aaron.ballman wrote:

> Yeah, I was worried this would get out of sycn and it really did not take long for that to happen in practice. I think there's utility in listing the checks in clang-tidy's documentation instead of pointing users to the SA documentation page. Users should have one website to go to where they can see what clang-tidy checks are available to them.

Does this still apply given that the quality and formatting match of the documentation website increased over the past one or two releases? The old website <http://clang-analyzer.llvm.org/> if I see correctly no longer lists the checkers (and the previous format was also increasingly outdated and bad experience...), and we have the RST-based new website <http://clang.llvm.org/docs/ClangStaticAnalyzer.html>.

Come to think of it, maybe some RST hacks could automate "pulling in" the list from the (new) CSA website to the Tidy list, as long as maybe they are in a separate category (heading) in the Tidy list?
Although I'm unsure how much being `/tools/clang/` and `/tools/clang/tools/extra/` mess this thing up.
In case of Python, for example, there is a well-understood way of registering the documentation site of third-party packages, and //your// documentation generator can automatically generate the cross-reference that links to the other, from your doc's point-of-view, external website. But that involves a considerable amount of "magic".
As far as I know, Sphinx is written in Python, so one could write Python code that runs //during// the documentation generation (at least the RST part, I'm not sure about the `man` or `infopages` or `groff` stuff!) that can do "magic".

----

What we //COULD// do, however, is get rid of the individual checker documentation files (which all just contain machine generated redirects, at least according to this diff...) and have ALL the cross-referencing links (hand-written, autogenerated by our integration, or autogenerated by RST magic) point to not a page living inside Tidy's scope that just does a redirect, but to the appropriate heading in the (new) CSA doc suite?

(Then again, irrespective of what magic we will use, the non-trivial grouping structure on the new CSA docs site can become a problem...)


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64454/new/

https://reviews.llvm.org/D64454



More information about the llvm-commits mailing list