//===--- ReadabilityTidyModule.cpp - clang-tidy ---------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "../ClangTidy.h" #include "../ClangTidyModule.h" #include "../ClangTidyModuleRegistry.h" #include "AvoidConstParamsInDecls.h" #include "BracesAroundStatementsCheck.h" #include "ConstReturnTypeCheck.h" #include "ContainerSizeEmptyCheck.h" #include "ConvertMemberFunctionsToStatic.h" #include "DeleteNullPointerCheck.h" #include "DeletedDefaultCheck.h" #include "ElseAfterReturnCheck.h" #include "FunctionCognitiveComplexityCheck.h" #include "FunctionSizeCheck.h" #include "IdentifierNamingCheck.h" #include "ImplicitBoolConversionCheck.h" #include "InconsistentDeclarationParameterNameCheck.h" #include "IsolateDeclarationCheck.h" #include "MagicNumbersCheck.h" #include "MakeMemberFunctionConstCheck.h" #include "MisleadingIndentationCheck.h" #include "MisplacedArrayIndexCheck.h" #include "NamedParameterCheck.h" #include "NonConstParameterCheck.h" #include "QualifiedAutoCheck.h" #include "RedundantAccessSpecifiersCheck.h" #include "RedundantControlFlowCheck.h" #include "RedundantDeclarationCheck.h" #include "RedundantFunctionPtrDereferenceCheck.h" #include "RedundantMemberInitCheck.h" #include "RedundantPreprocessorCheck.h" #include "RedundantSmartptrGetCheck.h" #include "RedundantStringCStrCheck.h" #include "RedundantStringInitCheck.h" #include "SimplifyBooleanExprCheck.h" #include "SimplifySubscriptExprCheck.h" #include "StaticAccessedThroughInstanceCheck.h" #include "StaticDefinitionInAnonymousNamespaceCheck.h" #include "StringCompareCheck.h" #include "UniqueptrDeleteReleaseCheck.h" #include "UppercaseLiteralSuffixCheck.h" #include "UseAnyOfAllOfCheck.h" namespace clang { namespace tidy { namespace readability { class ReadabilityModule : public ClangTidyModule { public: void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { CheckFactories.registerCheck( "readability-avoid-const-params-in-decls"); CheckFactories.registerCheck( "readability-braces-around-statements"); CheckFactories.registerCheck( "readability-const-return-type"); CheckFactories.registerCheck( "readability-container-size-empty"); CheckFactories.registerCheck( "readability-convert-member-functions-to-static"); CheckFactories.registerCheck( "readability-delete-null-pointer"); CheckFactories.registerCheck( "readability-deleted-default"); CheckFactories.registerCheck( "readability-else-after-return"); CheckFactories.registerCheck( "readability-function-cognitive-complexity"); CheckFactories.registerCheck( "readability-function-size"); CheckFactories.registerCheck( "readability-identifier-naming"); CheckFactories.registerCheck( "readability-implicit-bool-conversion"); CheckFactories.registerCheck( "readability-inconsistent-declaration-parameter-name"); CheckFactories.registerCheck( "readability-isolate-declaration"); CheckFactories.registerCheck( "readability-magic-numbers"); CheckFactories.registerCheck( "readability-make-member-function-const"); CheckFactories.registerCheck( "readability-misleading-indentation"); CheckFactories.registerCheck( "readability-misplaced-array-index"); CheckFactories.registerCheck( "readability-qualified-auto"); CheckFactories.registerCheck( "readability-redundant-access-specifiers"); CheckFactories.registerCheck( "readability-redundant-function-ptr-dereference"); CheckFactories.registerCheck( "readability-redundant-member-init"); CheckFactories.registerCheck( "readability-redundant-preprocessor"); CheckFactories.registerCheck( "readability-simplify-subscript-expr"); CheckFactories.registerCheck( "readability-static-accessed-through-instance"); CheckFactories.registerCheck( "readability-static-definition-in-anonymous-namespace"); CheckFactories.registerCheck( "readability-string-compare"); CheckFactories.registerCheck( "readability-named-parameter"); CheckFactories.registerCheck( "readability-non-const-parameter"); CheckFactories.registerCheck( "readability-redundant-control-flow"); CheckFactories.registerCheck( "readability-redundant-declaration"); CheckFactories.registerCheck( "readability-redundant-smartptr-get"); CheckFactories.registerCheck( "readability-redundant-string-cstr"); CheckFactories.registerCheck( "readability-redundant-string-init"); CheckFactories.registerCheck( "readability-simplify-boolean-expr"); CheckFactories.registerCheck( "readability-uniqueptr-delete-release"); CheckFactories.registerCheck( "readability-uppercase-literal-suffix"); CheckFactories.registerCheck( "readability-use-anyofallof"); } }; // Register the ReadabilityModule using this statically initialized variable. static ClangTidyModuleRegistry::Add X("readability-module", "Adds readability-related checks."); } // namespace readability // This anchor is used to force the linker to link in the generated object file // and thus register the ReadabilityModule. volatile int ReadabilityModuleAnchorSource = 0; } // namespace tidy } // namespace clang