exclude proto generated files from lint

This commit is contained in:
Jeff Donahue 2014-02-25 12:49:57 -08:00 коммит произвёл Evan Shelhamer
Родитель 466ec38da1
Коммит 488a4bd4a7
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -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)