aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2018-02-15 23:05:09 +0100
committerRobin Krahl <me@robin-krahl.de>2018-02-15 23:05:09 +0100
commit049a90ed8a45f2c17e6ea7ed0df70db1d7fbf038 (patch)
treebe8ff432428ae150d97cb64d4981ac37cd0dbb99
parentaa9d554d736604a0716698e803bcd01165ed0773 (diff)
downloadsqlitepp-049a90ed8a45f2c17e6ea7ed0df70db1d7fbf038.tar.gz
sqlitepp-049a90ed8a45f2c17e6ea7ed0df70db1d7fbf038.tar.bz2
Add clang-tidy tests to target checkstyleHEADmaster
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
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 -