aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-05-16 19:14:46 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-05-16 22:49:34 +0300
commit06bc9d1b7bcbc1cfdb6d38b3b6d4fb18e6cdad12 (patch)
tree2fea4f8a16d6853512b99cf4b199afdb14058dde
parentclang-tidy fixes (diff)
downloadwinapi-common-06bc9d1b7bcbc1cfdb6d38b3b6d4fb18e6cdad12.tar.gz
winapi-common-06bc9d1b7bcbc1cfdb6d38b3b6d4fb18e6cdad12.zip
add .clang-tidy, `make check`
Diffstat (limited to '')
-rw-r--r--.clang-tidy4
-rw-r--r--Makefile9
2 files changed, 13 insertions, 0 deletions
diff --git a/.clang-tidy b/.clang-tidy
new file mode 100644
index 0000000..6777f75
--- /dev/null
+++ b/.clang-tidy
@@ -0,0 +1,4 @@
+---
+Checks: 'clang-diagnostic-*,clang-analyzer-*,bugprone-*,cppcoreguidelines-,modernize-*,-modernize-use-trailing-return-type,-modernize-use-nullptr,performance-*'
+...
+
diff --git a/Makefile b/Makefile
index b1641b3..75f36c6 100644
--- a/Makefile
+++ b/Makefile
@@ -82,3 +82,12 @@ install: build
.PHONY: test
test:
cd -- '$(call escape,$(cmake_dir))' && ctest -C '$(call escape,$(CONFIGURATION))' --verbose
+
+clang-tidy := run-clang-tidy
+ifeq (1,$(shell test -e /usr/share/clang/run-clang-tidy.py && echo 1))
+clang-tidy := /usr/share/clang/run-clang-tidy.py
+endif
+
+.PHONY: check
+check:
+ $(clang-tidy) -p '$(call escape,$(cmake_dir))' -quiet