diff options
author | Haojian Wu <hokein@google.com> | 2019-01-25 10:03:49 +0000 |
---|---|---|
committer | Haojian Wu <hokein@google.com> | 2019-01-25 10:03:49 +0000 |
commit | c67dab5bd0a1ca14dcacc9d27166bc555044d16f (patch) | |
tree | 362053ed769a168b44e70d9101651c402003a4a2 /clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | |
parent | 914e838e636d44c9798e790535bacec04a16b0d5 (diff) | |
download | bcm5719-llvm-c67dab5bd0a1ca14dcacc9d27166bc555044d16f.tar.gz bcm5719-llvm-c67dab5bd0a1ca14dcacc9d27166bc555044d16f.zip |
[clang-tidy] Add check for underscores in googletest names.
Summary: Adds a clang-tidy warning for underscores in googletest names.
Patch by Kar Epker!
Reviewers: hokein, alexfh, aaron.ballman
Reviewed By: hokein
Subscribers: Eugene.Zelenko, JonasToth, MyDeveloperDay, lebedev.ri, xazax.hun, mgorny, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D56424
llvm-svn: 352183
Diffstat (limited to 'clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp index e6236ec2512..c2a9ec5edbc 100644 --- a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp @@ -14,6 +14,7 @@ #include "../readability/NamespaceCommentCheck.h" #include "AvoidCStyleCastsCheck.h" #include "AvoidThrowingObjCExceptionCheck.h" +#include "AvoidUnderscoreInGoogletestNameCheck.h" #include "DefaultArgumentsCheck.h" #include "ExplicitConstructorCheck.h" #include "ExplicitMakePairCheck.h" @@ -60,6 +61,9 @@ class GoogleModule : public ClangTidyModule { "google-runtime-operator"); CheckFactories.registerCheck<runtime::NonConstReferences>( "google-runtime-references"); + CheckFactories + .registerCheck<readability::AvoidUnderscoreInGoogletestNameCheck>( + "google-readability-avoid-underscore-in-googletest-name"); CheckFactories.registerCheck<readability::AvoidCStyleCastsCheck>( "google-readability-casting"); CheckFactories.registerCheck<readability::TodoCommentCheck>( |