From a17ffbddf410cb662090850ae598e5f973178687 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 2 Oct 2018 13:05:19 +0200 Subject: [PATCH 1/2] build: make lint-addon-docs quiet This commit adds the --quiet flag to cpplint for the lint-addon-docs target to be consistent with the lint-cpp target. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fea678cf45f134..d09ecd1a6bbcd6 100644 --- a/Makefile +++ b/Makefile @@ -1199,7 +1199,7 @@ tools/.cpplintstamp: $(LINT_CPP_FILES) lint-addon-docs: test/addons/.docbuildstamp @echo "Running C++ linter on addon docs..." - @$(PYTHON) tools/cpplint.py --filter=$(ADDON_DOC_LINT_FLAGS) $(LINT_CPP_ADDON_DOC_FILES_GLOB) + @$(PYTHON) tools/cpplint.py --quiet --filter=$(ADDON_DOC_LINT_FLAGS) $(LINT_CPP_ADDON_DOC_FILES_GLOB) cpplint: lint-cpp @echo "Please use lint-cpp instead of cpplint" From 6a313f4c7e01e51b373b476f3a434bcd48b0c7ea Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 4 Oct 2018 07:49:06 +0200 Subject: [PATCH 2/2] build: toggle lint-cpp using verbose (V) variable This commit the verbosity of cpplint to be toggled by using the V variable. The default setting is verbose but by passing an empty string cpplint will be quiet. --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d09ecd1a6bbcd6..b571eed57cd10e 100644 --- a/Makefile +++ b/Makefile @@ -1187,19 +1187,25 @@ else @echo "To install (requires internet access) run: $ make format-cpp-build" endif +ifeq ($(V),1) + CPPLINT_QUIET = +else + CPPLINT_QUIET = --quiet +endif .PHONY: lint-cpp # Lints the C++ code with cpplint.py and check-imports.py. lint-cpp: tools/.cpplintstamp tools/.cpplintstamp: $(LINT_CPP_FILES) @echo "Running C++ linter..." - @$(PYTHON) tools/cpplint.py --quiet $? + @$(PYTHON) tools/cpplint.py $(CPPLINT_QUIET) $? @$(PYTHON) tools/check-imports.py @touch $@ lint-addon-docs: test/addons/.docbuildstamp @echo "Running C++ linter on addon docs..." - @$(PYTHON) tools/cpplint.py --quiet --filter=$(ADDON_DOC_LINT_FLAGS) $(LINT_CPP_ADDON_DOC_FILES_GLOB) + @$(PYTHON) tools/cpplint.py $(CPPLINT_QUIET) --filter=$(ADDON_DOC_LINT_FLAGS) \ + $(LINT_CPP_ADDON_DOC_FILES_GLOB) cpplint: lint-cpp @echo "Please use lint-cpp instead of cpplint"