From 06bc9d1b7bcbc1cfdb6d38b3b6d4fb18e6cdad12 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 16 May 2021 19:14:46 +0300 Subject: add .clang-tidy, `make check` --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Makefile') 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 -- cgit v1.2.3