[PATCH] D33365: [clang-tidy] misc-assertion-count: A New Check
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 1 00:15:47 PDT 2017
lebedev.ri added a comment.
In https://reviews.llvm.org/D33365#802884, @lebedev.ri wrote:
> In https://reviews.llvm.org/D33365#775916, @alexfh wrote:
>
> > I think, this kind of a check needs some prior research (not necessarily in the sense of a printed paper, but at least a thoughtful analysis of the relevant metrics on real code bases) to back up the specific way the sufficiency of asserts is determined.
>
>
> While might be slightly unrelated(?), there is obviously a Cyclomatic Complexity, and a Cognitive Complexity, from SonarQube <https://www.sonarsource.com/docs/CognitiveComplexity.pdf>.
> The latter one **might** actually be interesting to have in `readability-function-size` or a separate check... Not sure if there are restrictions on the algorithm though.
I'll work on implementing that CognitiveComplexity as a new check (`readability-function-cognitive-complexity`, probably), and then we'll see if it will help here or not.
Repository:
rL LLVM
https://reviews.llvm.org/D33365
More information about the cfe-commits
mailing list