Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang-tidy] readability-function-size: add NestingThreshold param.
Summary: Finds compound statements which create next nesting level after `NestingThreshold` and emits a warning. Do note that it warns about each compound statement that breaches the threshold, but not any of it's sub-statements, to have readable warnings. I was able to find only one coding style referencing nesting: - https://www.kernel.org/doc/html/v4.10/process/coding-style.html#indentation > In short, 8-char indents make things easier to read, and have the added benefit of warning you when you’re nesting your functions too deep. This seems too basic, i'm not sure what else to test. Are more tests needed? Reviewers: alexfh, aaron.ballman, sbenza Reviewed By: alexfh, aaron.ballman Subscribers: xazax.hun Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D32942 llvm-svn: 305082
- Loading branch information
Showing
5 changed files
with
78 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters