From 049a90ed8a45f2c17e6ea7ed0df70db1d7fbf038 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Thu, 15 Feb 2018 23:05:09 +0100 Subject: Add clang-tidy tests to target checkstyle --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6ebdda4..af8ff7c 100644 --- a/Makefile +++ b/Makefile @@ -40,13 +40,15 @@ LDFLAGS += $(LDFLAGS_SQLITE3) LDFLAGS_LIB += -Wl,-soname,lib$(TARGET_NAME_LIB).so.$(VERSION_MAJOR) LDFLAGS_TEST += -L$(LIBRARY_DIR) -l$(TARGET_NAME_LIB) $(LDFLAGS_GTEST) -Wl,-rpath,$(LIBRARY_DIR) +CLANG_TIDY_CHECKS := "clang*,cppcoreguidelines*,modernize*,readability*" + ifdef VERBOSE QUIET := else QUIET := @ endif -.PHONY = all clean doc memcheck test +.PHONY = all checkstyle clean doc memcheck test all: $(TARGETS) @@ -60,6 +62,11 @@ clean: $(info (RM) $(DOCUMENTATION_DIR)) $(QUIET)$(RM) -r $(DOCUMENTATION_DIR) +checkstyle: + clang-tidy --checks=$(CLANG_TIDY_CHECKS) \ + $(INCLUDES) $(SOURCES_LIB) \ + -- -x c++ $(CPPFLAGS) $(CXXFLAGS) + doc: $(INCLUDES) (cat Doxyfile ; echo "PROJECT_NUMBER=$(VERSION)" ) | doxygen - -- cgit v1.2.3