summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-12-10 12:11:49 -0500
committerDavid Robillard <d@drobilla.net>2022-12-11 13:09:54 -0500
commit9fb939e1a9fb1b0f13e1818e1c81bc15b70e8c64 (patch)
tree9cb043a9c67fb9776085a97d615cee17f3793a50
parent07248d1c3ea7cb071aafddebf0ba98221baa08d0 (diff)
downloadsratom-9fb939e1a9fb1b0f13e1818e1c81bc15b70e8c64.tar.gz
sratom-9fb939e1a9fb1b0f13e1818e1c81bc15b70e8c64.tar.bz2
sratom-9fb939e1a9fb1b0f13e1818e1c81bc15b70e8c64.zip
Make clang-tidy configuration clean when run via meson
-rw-r--r--.clang-tidy24
-rw-r--r--src/.clang-tidy17
-rw-r--r--test/.clang-tidy13
-rw-r--r--test/headers/.clang-tidy2
4 files changed, 26 insertions, 30 deletions
diff --git a/.clang-tidy b/.clang-tidy
index cbea2d8..1a15411 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -3,24 +3,14 @@
Checks: >
*,
- -*-magic-numbers,
- -*-narrowing-conversions,
- -*-uppercase-literal-suffix,
-altera-*,
- -bugprone-easily-swappable-parameters,
- -bugprone-macro-parentheses,
- -bugprone-suspicious-string-compare,
- -cert-err33-c,
- -cert-err34-c,
- -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
- -clang-analyzer-unix.Malloc,
- -hicpp-signed-bitwise,
- -llvm-header-guard,
+ -clang-diagnostic-unused-macros,
-llvmlibc-*,
- -misc-no-recursion,
- -performance-no-int-to-ptr,
- -readability-function-cognitive-complexity,
- -readability-identifier-length,
+CheckOptions:
+ - key: hicpp-uppercase-literal-suffix.NewSuffixes
+ value: 'L;U;UL;ULL'
+ - key: readability-uppercase-literal-suffix.NewSuffixes
+ value: 'L;U;UL;ULL'
WarningsAsErrors: '*'
-HeaderFilterRegex: '.*'
+HeaderFilterRegex: '.*/sratom/[^/]+.h'
FormatStyle: file
diff --git a/src/.clang-tidy b/src/.clang-tidy
new file mode 100644
index 0000000..0ec528b
--- /dev/null
+++ b/src/.clang-tidy
@@ -0,0 +1,17 @@
+# Copyright 2020-2022 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: 0BSD OR ISC
+
+Checks: >
+ -*-magic-numbers,
+ -*-narrowing-conversions,
+ -*-uppercase-literal-suffix,
+ -bugprone-easily-swappable-parameters,
+ -bugprone-suspicious-string-compare,
+ -cert-err33-c,
+ -cert-err34-c,
+ -clang-analyzer-unix.Malloc,
+ -hicpp-signed-bitwise,
+ -misc-no-recursion,
+ -readability-function-cognitive-complexity,
+ -readability-identifier-length,
+InheritParentConfig: true
diff --git a/test/.clang-tidy b/test/.clang-tidy
index 5b5e5c9..e4b41e4 100644
--- a/test/.clang-tidy
+++ b/test/.clang-tidy
@@ -2,19 +2,8 @@
# SPDX-License-Identifier: 0BSD OR ISC
Checks: >
- *,
-*-magic-numbers,
- -*-uppercase-literal-suffix,
- -altera-*,
- -bugprone-macro-parentheses,
-bugprone-suspicious-string-compare,
-cert-err33-c,
- -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
- -hicpp-signed-bitwise,
- -llvm-header-guard,
- -llvmlibc-*,
- -performance-no-int-to-ptr,
-readability-identifier-length,
-WarningsAsErrors: '*'
-HeaderFilterRegex: '.*'
-FormatStyle: file
+InheritParentConfig: true
diff --git a/test/headers/.clang-tidy b/test/headers/.clang-tidy
index 924f1d5..9457bcf 100644
--- a/test/headers/.clang-tidy
+++ b/test/headers/.clang-tidy
@@ -6,5 +6,5 @@ Checks: >
-altera-*,
-llvmlibc-*,
WarningsAsErrors: '*'
-HeaderFilterRegex: '.*/sratom\.h'
+HeaderFilterRegex: '.*/sratom/[^/]+.h'
FormatStyle: file