Changeset View
Changeset View
Standalone View
Standalone View
clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
#include "SimplifySubscriptExprCheck.h" | #include "SimplifySubscriptExprCheck.h" | ||||
#include "StaticAccessedThroughInstanceCheck.h" | #include "StaticAccessedThroughInstanceCheck.h" | ||||
#include "StaticDefinitionInAnonymousNamespaceCheck.h" | #include "StaticDefinitionInAnonymousNamespaceCheck.h" | ||||
#include "StringCompareCheck.h" | #include "StringCompareCheck.h" | ||||
#include "SuspiciousCallArgumentCheck.h" | #include "SuspiciousCallArgumentCheck.h" | ||||
#include "UniqueptrDeleteReleaseCheck.h" | #include "UniqueptrDeleteReleaseCheck.h" | ||||
#include "UppercaseLiteralSuffixCheck.h" | #include "UppercaseLiteralSuffixCheck.h" | ||||
#include "UseAnyOfAllOfCheck.h" | #include "UseAnyOfAllOfCheck.h" | ||||
#include "UseEarlyExitsCheck.h" | |||||
namespace clang { | namespace clang { | ||||
namespace tidy { | namespace tidy { | ||||
namespace readability { | namespace readability { | ||||
class ReadabilityModule : public ClangTidyModule { | class ReadabilityModule : public ClangTidyModule { | ||||
public: | public: | ||||
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { | void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { | ||||
CheckFactories.registerCheck<SuspiciousCallArgumentCheck>( | CheckFactories.registerCheck<SuspiciousCallArgumentCheck>( | ||||
"readability-suspicious-call-argument"); | "readability-suspicious-call-argument"); | ||||
CheckFactories.registerCheck<UniqueptrDeleteReleaseCheck>( | CheckFactories.registerCheck<UniqueptrDeleteReleaseCheck>( | ||||
"readability-uniqueptr-delete-release"); | "readability-uniqueptr-delete-release"); | ||||
CheckFactories.registerCheck<UppercaseLiteralSuffixCheck>( | CheckFactories.registerCheck<UppercaseLiteralSuffixCheck>( | ||||
"readability-uppercase-literal-suffix"); | "readability-uppercase-literal-suffix"); | ||||
CheckFactories.registerCheck<UseAnyOfAllOfCheck>( | CheckFactories.registerCheck<UseAnyOfAllOfCheck>( | ||||
"readability-use-anyofallof"); | "readability-use-anyofallof"); | ||||
CheckFactories.registerCheck<UseEarlyExitsCheck>( | |||||
"readability-use-early-exits"); | |||||
} | } | ||||
}; | }; | ||||
// Register the ReadabilityModule using this statically initialized variable. | // Register the ReadabilityModule using this statically initialized variable. | ||||
static ClangTidyModuleRegistry::Add<ReadabilityModule> | static ClangTidyModuleRegistry::Add<ReadabilityModule> | ||||
X("readability-module", "Adds readability-related checks."); | X("readability-module", "Adds readability-related checks."); | ||||
} // namespace readability | } // namespace readability | ||||
// This anchor is used to force the linker to link in the generated object file | // This anchor is used to force the linker to link in the generated object file | ||||
// and thus register the ReadabilityModule. | // and thus register the ReadabilityModule. | ||||
volatile int ReadabilityModuleAnchorSource = 0; | volatile int ReadabilityModuleAnchorSource = 0; | ||||
} // namespace tidy | } // namespace tidy | ||||
} // namespace clang | } // namespace clang |