From 488a4bd4a7032e7ff2779c3511e3083c1271b297 Mon Sep 17 00:00:00 2001 From: Jeff Donahue Date: Tue, 25 Feb 2014 12:49:57 -0800 Subject: [PATCH] exclude proto generated files from lint --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index acbb697d..886e4217 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,10 @@ TOOL_SRCS := $(shell find tools -name "*.cpp") EXAMPLE_SRCS := $(shell find examples -name "*.cpp") # PROTO_SRCS are the protocol buffer definitions PROTO_SRCS := $(wildcard src/$(PROJECT)/proto/*.proto) +# NONGEN_CXX_SRCS includes all source/header files except those generated by +# proto. +NONGEN_CXX_SRCS := $(shell find src/$(PROJECT) include/$(PROJECT) \ + -regex ".*\.\(cpp\|hpp\|cu\|cuh\)") # PY$(PROJECT)_SRC is the python wrapper for $(PROJECT) PY$(PROJECT)_SRC := python/$(PROJECT)/py$(PROJECT).cpp PY$(PROJECT)_SO := python/$(PROJECT)/py$(PROJECT).so @@ -111,9 +115,7 @@ linecount: clean cloc --read-lang-def=$(PROJECT).cloc src/$(PROJECT)/ lint: - ./scripts/cpplint.py $(CXX_SRCS) $(HXX_SRCS) $(CU_SRCS) \ - $(TEST_SRCS) $(TEST_HDRS) $(EXAMPLE_SRCS) \ - $(PY$(PROJECT)_SRC) $(MAT$(PROJECT)_SRC) + ./scripts/cpplint.py $(NONGEN_CXX_SRCS) test: init $(TEST_BINS)