llvm-project/clang-tools-extra/clang-tidy/readability
Jens Massberg bff7faea20 [clang-tidy] Add options to describe individual core increments to readability-function-cognitive-complexity check.
Often you are only interested in the overall cognitive complexity of a
function and not every individual increment. Thus the flag
'DescribeBasicIncrements' is added. If it is set to 'true', each increment
is flagged. Otherwise, only the complexity of function with complexity
of at least the threshold are flagged.

By default 'DescribeBasisIncrements' is set to 'true', which is the original behavior of the check.

Added a new test for different flag combinations.

(The option to ignore macros which was original part of this patch will be added in another path)

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D96281
2021-03-04 21:02:27 +01:00
..
AvoidConstParamsInDecls.cpp [clang-tidy] Fix readability-avoid-const-params-in-decls removing const in template paramaters 2021-02-24 15:54:10 +00:00
AvoidConstParamsInDecls.h [clang-tidy] Simplify const params check 2021-02-17 10:20:12 +00:00
BracesAroundStatementsCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
BracesAroundStatementsCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
CMakeLists.txt [clang-tidy] Implement readability-function-cognitive-complexity check 2020-10-03 00:27:13 +03:00
ConstReturnTypeCheck.cpp [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
ConstReturnTypeCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
ContainerSizeEmptyCheck.cpp [clang-tidy] Simplify implementation of container-size-empty 2021-02-05 14:03:41 +00:00
ContainerSizeEmptyCheck.h [clang-tidy] Simplify implementation of container-size-empty 2021-02-05 14:03:41 +00:00
ConvertMemberFunctionsToStatic.cpp [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
ConvertMemberFunctionsToStatic.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
DeleteNullPointerCheck.cpp [clang-tidy] Simplify delete null ptr check 2021-02-17 10:18:36 +00:00
DeleteNullPointerCheck.h [clang-tidy] Simplify delete null ptr check 2021-02-17 10:18:36 +00:00
DeletedDefaultCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DeletedDefaultCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
ElseAfterReturnCheck.cpp [clang-tidy] [clangd] Avoid multi-line diagnostic range for else-after-return diagnostic 2020-11-29 18:32:23 -05:00
ElseAfterReturnCheck.h [clang-tidy] ElseAfterReturn check wont suggest fixes if preprocessor branches are involved 2020-11-19 18:20:32 +00:00
FunctionCognitiveComplexityCheck.cpp [clang-tidy] Add options to describe individual core increments to readability-function-cognitive-complexity check. 2021-03-04 21:02:27 +01:00
FunctionCognitiveComplexityCheck.h [clang-tidy] Add options to describe individual core increments to readability-function-cognitive-complexity check. 2021-03-04 21:02:27 +01:00
FunctionSizeCheck.cpp Fix file headers. NFC 2019-03-01 09:52:53 +00:00
FunctionSizeCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
IdentifierNamingCheck.cpp [clang-tidy] Remove OptionError 2021-03-01 17:55:17 +00:00
IdentifierNamingCheck.h [clang-tidy] Support IgnoredRegexp configuration to selectively suppress identifier naming checks 2020-11-25 01:18:44 +00:00
ImplicitBoolConversionCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
ImplicitBoolConversionCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
InconsistentDeclarationParameterNameCheck.cpp [cte][NFC] Remove all references to stdlib stream headers. 2021-03-02 21:57:16 +00:00
InconsistentDeclarationParameterNameCheck.h [clang-tidy] Convert config options that are bools to use the bool overload of get(GlobalOrLocal)? 2020-04-12 23:06:09 +01:00
IsolateDeclarationCheck.cpp [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
IsolateDeclarationCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
MagicNumbersCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 12:39:33 +01:00
MagicNumbersCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
MakeMemberFunctionConstCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
MakeMemberFunctionConstCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
MisleadingIndentationCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
MisleadingIndentationCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
MisplacedArrayIndexCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
MisplacedArrayIndexCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
NamedParameterCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
NamedParameterCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
NamespaceCommentCheck.cpp [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
NamespaceCommentCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
NonConstParameterCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
NonConstParameterCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
QualifiedAutoCheck.cpp [clang-tidy][NFC] Tweak some generation of diag messages 2021-02-26 19:10:25 +00:00
QualifiedAutoCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
ReadabilityTidyModule.cpp [clang-tidy] Implement readability-function-cognitive-complexity check 2020-10-03 00:27:13 +03:00
RedundantAccessSpecifiersCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
RedundantAccessSpecifiersCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
RedundantControlFlowCheck.cpp [clang-tidy] Use new mapping matchers 2021-02-03 23:21:17 +00:00
RedundantControlFlowCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
RedundantDeclarationCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
RedundantDeclarationCheck.h [clang-tidy] Implement storeOptions for checks missing it. 2020-06-21 19:01:11 +01:00
RedundantFunctionPtrDereferenceCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
RedundantFunctionPtrDereferenceCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
RedundantMemberInitCheck.cpp [clang-tidy] Simplify redundant member init check 2021-02-27 12:11:44 +00:00
RedundantMemberInitCheck.h [clang-tidy] Simplify redundant member init check 2021-02-27 12:11:44 +00:00
RedundantPreprocessorCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
RedundantPreprocessorCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
RedundantSmartptrGetCheck.cpp [clang-tidy] Handle uninstantiated templates in redundant get check 2021-02-27 12:08:41 +00:00
RedundantSmartptrGetCheck.h [clang-tidy] Handle uninstantiated templates in redundant get check 2021-02-27 12:08:41 +00:00
RedundantStringCStrCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
RedundantStringCStrCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
RedundantStringInitCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
RedundantStringInitCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
SimplifyBooleanExprCheck.cpp [clang-tidy] Simplify boolean expr check 2021-02-27 12:13:24 +00:00
SimplifyBooleanExprCheck.h [clang-tidy] Simplify boolean expr check 2021-02-27 12:13:24 +00:00
SimplifySubscriptExprCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
SimplifySubscriptExprCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
StaticAccessedThroughInstanceCheck.cpp [clang-tidy] Fix invalid fixit for readability-static-accessed-through-instance (bug 40544) 2019-05-14 18:23:10 +00:00
StaticAccessedThroughInstanceCheck.h [clang-tidy] Implement storeOptions for checks missing it. 2020-06-21 19:01:11 +01:00
StaticDefinitionInAnonymousNamespaceCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StaticDefinitionInAnonymousNamespaceCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
StringCompareCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
StringCompareCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
UniqueptrDeleteReleaseCheck.cpp [clang-tidy] Added option to uniqueptr delete release check 2021-03-01 21:52:13 +00:00
UniqueptrDeleteReleaseCheck.h [clang-tidy] Added option to uniqueptr delete release check 2021-03-01 21:52:13 +00:00
UppercaseLiteralSuffixCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
UppercaseLiteralSuffixCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
UseAnyOfAllOfCheck.cpp [clang-tidy][NFC] Tweak some generation of diag messages 2021-02-26 19:10:25 +00:00
UseAnyOfAllOfCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00