aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-02-24 19:28:11 +0100
committerDavid Robillard <d@drobilla.net>2019-04-13 19:48:23 +0200
commit5aeb95bfa65b61ee64d07cd76905fb071c8a5e17 (patch)
tree1432171a0c6e8f8077ce427bab77f7b35591037e
parent16d4ccf422f8e470bf4bdc9458047831b0dc7116 (diff)
downloadserd-5aeb95bfa65b61ee64d07cd76905fb071c8a5e17.tar.gz
serd-5aeb95bfa65b61ee64d07cd76905fb071c8a5e17.tar.bz2
serd-5aeb95bfa65b61ee64d07cd76905fb071c8a5e17.zip
Add clang-tidy file
-rw-r--r--.clang-tidy29
-rw-r--r--wscript12
2 files changed, 31 insertions, 10 deletions
diff --git a/.clang-tidy b/.clang-tidy
new file mode 100644
index 00000000..4bc595ff
--- /dev/null
+++ b/.clang-tidy
@@ -0,0 +1,29 @@
+Checks: >
+ *,
+ -android-cloexec-fopen,
+ -bugprone-suspicious-string-compare,
+ -cert-dcl50-cpp,
+ -cert-msc30-c,
+ -cert-msc50-cpp,
+ -clang-analyzer-alpha.*,
+ -cppcoreguidelines-pro-bounds-array-to-pointer-decay,
+ -cppcoreguidelines-pro-bounds-pointer-arithmetic,
+ -cppcoreguidelines-pro-type-reinterpret-cast,
+ -cppcoreguidelines-pro-type-vararg,
+ -fuchsia-default-arguments,
+ -fuchsia-overloaded-operator,
+ -google-readability-todo,
+ -google-runtime-references,
+ -google-explicit-constructor,
+ -hicpp-invalid-access-moved,
+ -hicpp-multiway-paths-covered,
+ -hicpp-no-array-decay,
+ -hicpp-signed-bitwise,
+ -hicpp-vararg,
+ -llvm-header-guard,
+ -readability-else-after-return,
+ -readability-implicit-bool-conversion,
+ -readability-named-parameter,
+WarningsAsErrors: ''
+HeaderFilterRegex: '.*'
+FormatStyle: file
diff --git a/wscript b/wscript
index c7182d58..c4aa1b16 100644
--- a/wscript
+++ b/wscript
@@ -225,16 +225,8 @@ def build(bld):
def lint(ctx):
"checks code for style issues"
import subprocess
- cmd = ("clang-tidy -p=. -header-filter=.* -checks=\"*," +
- "-bugprone-suspicious-string-compare," +
- "-clang-analyzer-alpha.*," +
- "-google-readability-todo," +
- "-hicpp-signed-bitwise," +
- "-llvm-header-guard," +
- "-misc-unused-parameters," +
- "-readability-else-after-return\" " +
- "../src/*.c")
- subprocess.call(cmd, cwd='build', shell=True)
+ subprocess.call('clang-tidy ../src/*.c ../tests/*.c ../tests/*.cpp',
+ cwd='build', shell=True)
def amalgamate(ctx):
"builds single-file amalgamated source"