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 | 1efc425551c0c7ac95cacad8f63dc31eb46c1f04 (patch) | |
tree | f1abd4eee68b1245551d67fcb968d46b64700efc /clang-tools-extra/test/clang-tidy/google-module.cpp | |
parent | 0445380f4f6f40c56871147d207cb3bf85529967 (diff) | |
download | bcm5719-llvm-1efc425551c0c7ac95cacad8f63dc31eb46c1f04.tar.gz bcm5719-llvm-1efc425551c0c7ac95cacad8f63dc31eb46c1f04.zip |
[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
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/google-module.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/google-module.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/google-module.cpp b/clang-tools-extra/test/clang-tidy/google-module.cpp new file mode 100644 index 00000000000..b7be164a95e --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/google-module.cpp @@ -0,0 +1,8 @@ +// RUN: clang-tidy -checks='-*,google*' -config='{}' -dump-config - -- | FileCheck %s +// CHECK: CheckOptions: +// CHECK: {{- key: *google-readability-braces-around-statements.ShortStatementLines}} +// CHECK-NEXT: {{value: *'1'}} +// CHECK: {{- key: *google-readability-namespace-comments.ShortNamespaceLines}} +// CHECK-NEXT: {{value: *'1'}} +// CHECK: {{- key: *google-readability-namespace-comments.SpacesBeforeComments}} +// CHECK-NEXT: {{value: *'2'}} |