]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Improve .clang-tidy HeaderFilterRegex patterns
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 7 Jul 2020 17:46:21 +0000 (19:46 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 7 Jul 2020 17:47:51 +0000 (19:47 +0200)
The pattern for unittest now excludes third_party headers as well.

src/.clang-tidy
unittest/.clang-tidy

index e0a0ace9eb3c9316cb5962a5d36ef7e4adae2b17..3b8edba8e3de3a76b9f5d4da515ebf2a131bc281 100644 (file)
@@ -52,8 +52,8 @@ Checks:          '-*,
                   -clang-analyzer-valist.Uninitialized,
                   -clang-analyzer-optin.performance.Padding'
 WarningsAsErrors: '*'
-# Exclude subdirectories (currently there is only third_party)
-HeaderFilterRegex: 'src/[^\\/]*^'
+# Only include headers directly in src.
+HeaderFilterRegex: 'src/[^/]*$'
 CheckOptions:
   # Always add braces (added here just in case clang-tidy default changes).
   - key:             readability-braces-around-statements.ShortStatementLines
index ea8ab28ecc091eec3d1ec63e364c50569d58d738..38b132b4186a2f3144f7c11a2c12d468aeb01e93 100644 (file)
@@ -1,8 +1,9 @@
 ---
 Checks:          '-*,readability-function-size'
 WarningsAsErrors: '*'
-HeaderFilterRegex: 'unittest/.*'
-CheckOptions:    
+# Only include headers directly in unittest.
+HeaderFilterRegex: 'unittest/[^/]*$'
+CheckOptions:
   # Always add braces (added here just in case clang-tidy default changes).
   - key:             readability-braces-around-statements.ShortStatementLines
     value:           0