[clang-tidy] Default options in modules.
authorAlexander Kornienko <alexfh@google.com>
Thu, 16 Oct 2014 11:27:57 +0000 (11:27 +0000)
committerAlexander Kornienko <alexfh@google.com>
Thu, 16 Oct 2014 11:27:57 +0000 (11:27 +0000)
commit1efc425551c0c7ac95cacad8f63dc31eb46c1f04
treef1abd4eee68b1245551d67fcb968d46b64700efc
parent0445380f4f6f40c56871147d207cb3bf85529967
[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

llvm-svn: 219923
clang-tools-extra/clang-tidy/ClangTidyModule.cpp
clang-tools-extra/clang-tidy/ClangTidyModule.h
clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
clang-tools-extra/clang-tidy/ClangTidyOptions.h
clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
clang-tools-extra/test/clang-tidy/google-module.cpp [new file with mode: 0644]