diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-05-16 19:25:46 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-05-16 19:25:46 +0300 |
commit | 3b0f635ea18d463cd19c4dfe3ec849b3048c3774 (patch) | |
tree | c4b41b705cbf9e697e254e94f1498040f06051b0 | |
parent | update cmake-common (diff) | |
download | winapi-debug-3b0f635ea18d463cd19c4dfe3ec849b3048c3774.tar.gz winapi-debug-3b0f635ea18d463cd19c4dfe3ec849b3048c3774.zip |
add .clang-tidy, `make check`
-rw-r--r-- | .clang-tidy | 4 | ||||
-rw-r--r-- | Makefile | 9 |
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-*' +... + @@ -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 |