diff options
author | Alexander Kornienko <alexfh@google.com> | 2014-10-16 11:27:57 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2014-10-16 11:27:57 +0000 |
commit | 91fddd15a2a0712a18e7fcd508d272eae8fe79ba (patch) | |
tree | 05270d4e763c802ef01e11315dc6ce611fc90a8e /clang-tidy/ClangTidyModule.h | |
parent | 48e17803cfb558d8015f3449a7b173a1362e8ff3 (diff) |
[clang-tidy] Default options in modules.
Summary:
This patch allows modules to specify default options for the checks
defined in them. This way a sufficiently configurable check can be registered in
multiple modules with different default options. E.g. the SpacesBeforeComments
option may be set to 1 for the "llvm-namespace-comments" check and to 2 for the
"google-readability-namespace-comment" check without modifying or extending the
check code.
This patch also registers the google-readability-braces-around-statements check
with suitable defaults.
Reviewers: djasper
Reviewed By: djasper
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D5798
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@219923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clang-tidy/ClangTidyModule.h')
-rw-r--r-- | clang-tidy/ClangTidyModule.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tidy/ClangTidyModule.h b/clang-tidy/ClangTidyModule.h index 6406d636..c1851b9e 100644 --- a/clang-tidy/ClangTidyModule.h +++ b/clang-tidy/ClangTidyModule.h @@ -87,6 +87,9 @@ public: /// \brief Implement this function in order to register all \c CheckFactories /// belonging to this module. virtual void addCheckFactories(ClangTidyCheckFactories &CheckFactories) = 0; + + /// \brief Gets default options for checks defined in this module. + virtual ClangTidyOptions getModuleOptions(); }; } // end namespace tidy |