9#include "../ClangTidy.h"
10#include "../ClangTidyModule.h"
11#include "../ClangTidyModuleRegistry.h"
66namespace readability {
72 "readability-avoid-const-params-in-decls");
74 "readability-avoid-nested-conditional-operator");
76 "readability-avoid-return-with-void-value");
78 "readability-avoid-unconditional-preprocessor-if");
80 "readability-braces-around-statements");
82 "readability-const-return-type");
84 "readability-container-contains");
86 "readability-container-data-pointer");
88 "readability-container-size-empty");
90 "readability-convert-member-functions-to-static");
92 "readability-delete-null-pointer");
94 "readability-duplicate-include");
96 "readability-else-after-return");
98 "readability-enum-initial-value");
100 "readability-function-cognitive-complexity");
102 "readability-function-size");
104 "readability-identifier-length");
106 "readability-identifier-naming");
108 "readability-implicit-bool-conversion");
110 "readability-math-missing-parentheses");
112 "readability-redundant-inline-specifier");
114 "readability-inconsistent-declaration-parameter-name");
116 "readability-isolate-declaration");
118 "readability-magic-numbers");
120 "readability-make-member-function-const");
122 "readability-misleading-indentation");
124 "readability-misplaced-array-index");
126 "readability-operators-representation");
128 "readability-qualified-auto");
130 "readability-redundant-access-specifiers");
132 "readability-redundant-casting");
134 "readability-redundant-function-ptr-dereference");
136 "readability-redundant-member-init");
138 "readability-redundant-preprocessor");
140 "readability-reference-to-constructed-temporary");
142 "readability-simplify-subscript-expr");
144 "readability-static-accessed-through-instance");
146 "readability-static-definition-in-anonymous-namespace");
148 "readability-string-compare");
150 "readability-named-parameter");
152 "readability-non-const-parameter");
154 "readability-redundant-control-flow");
156 "readability-redundant-declaration");
158 "readability-redundant-smartptr-get");
160 "readability-redundant-string-cstr");
162 "readability-redundant-string-init");
164 "readability-simplify-boolean-expr");
166 "readability-suspicious-call-argument");
168 "readability-uniqueptr-delete-release");
170 "readability-uppercase-literal-suffix");
172 "readability-use-anyofallof");
174 "readability-use-std-min-max");
179static ClangTidyModuleRegistry::Add<ReadabilityModule>
180 X(
"readability-module",
"Adds readability-related checks.");
A collection of ClangTidyCheckFactory instances.
void registerCheck(llvm::StringRef CheckName)
Registers the CheckType with the name Name.
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name.
Identifies instances of nested conditional operators in the code.
Finds return statements with void values used within functions with void result types.
Finds code blocks that are constantly enabled or disabled in preprocessor directives by analyzing #if...
Checks that bodies of if statements and loops (for, range-for, do-while, and while) are inside braces...
For any function whose return type is const-qualified, suggests removal of the const qualifier from t...
Finds usages of container.count() and find() == end() which should be replaced by a call to the conta...
Checks whether a call to operator[] and & can be replaced with a call to data().
Checks whether a call to the size()/length() method can be replaced with a call to empty().
This check finds C++ class methods than can be made static because they don't use the 'this' pointer.
Check whether the 'if' statement is unnecessary before calling 'delete' on a pointer.
Find and remove duplicate #include directives.
Flags the usages of else after return.
Enforces consistent style for enumerators' initialization, covering three styles: none,...
Checks function Cognitive Complexity metric.
Checks for large functions based on various metrics.
Warns about identifiers names whose length is too short.
Checks for identifiers naming style mismatch.
Checks for use of implicit bool conversions in expressions.
Checks for declarations of functions which differ in parameter names.
This check diagnoses all DeclStmt's declaring more than one variable and tries to refactor the code t...
Detects magic numbers, integer and floating point literals embedded in code.
Finds non-static member functions that can be made 'const'.
Check for mising parantheses in mathematical expressions that involve operators of different prioriti...
Checks the code for dangling else, and possible misleading indentations due to missing braces.
Warn about unusual array index syntax (index[array] instead of array[index]).
Find functions with unnamed arguments.
Warn when a pointer function parameter can be const.
Enforces consistent token representation for invoked binary, unary and overloaded operators in C++ co...
Finds variables declared as auto that could be declared as: 'auto*' or 'const auto *' and reference v...
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override
Implement this function in order to register all CheckFactories belonging to this module.
Detects redundant access specifiers inside classes, structs, and unions.
Detects explicit type casting operations that involve the same source and destination types,...
Eliminates redundant return statements at the end of a function that returns void.
Find redundant variable declarations.
Eliminate redundant dereferences of a function pointer.
Detects redundant inline specifiers on function and variable declarations.
Finds member initializations that are unnecessary because the same default constructor would be calle...
This check flags redundant preprocessor directives: nested directives with the same condition.
Find and remove redundant calls to smart pointer's .get() method.
Finds unnecessary calls to std::string::c_str().
Finds unnecessary string initializations.
Detects C++ code where a reference variable is used to extend the lifetime of a temporary object that...
Looks for boolean expressions involving boolean constants and simplifies them to use the appropriate ...
Simplifies subscript expressions.
Checks for member expressions that access static members through instances and replaces them with use...
Finds static function and variable definitions in anonymous namespace.
This check flags all calls compare when used to check for string equality or inequality.
Finds function calls where the arguments passed are provided out of order, based on the difference be...
Flags statements of the form delete <unique_ptr expr>.release(); and replaces them with: <unique_ptr ...
Detects when the integral literal or floating point literal has non-uppercase suffix,...
Finds ranged-based for loops that can be replaced by a call to std::any_of or std::all_of.
Replaces certain conditional statements with equivalent calls to std::min or std::max.
volatile int ReadabilityModuleAnchorSource