Skip to content

Commit cf17759

Browse files
danbevtargos
authored andcommittedOct 7, 2018
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. PR-URL: #23217 Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent b0dc0ca commit cf17759

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed
 

‎Makefile

+8-2
Original file line numberDiff line numberDiff line change
@@ -1181,19 +1181,25 @@ else
11811181
@echo "To install (requires internet access) run: $ make format-cpp-build"
11821182
endif
11831183

1184+
ifeq ($(V),1)
1185+
CPPLINT_QUIET =
1186+
else
1187+
CPPLINT_QUIET = --quiet
1188+
endif
11841189
.PHONY: lint-cpp
11851190
# Lints the C++ code with cpplint.py and check-imports.py.
11861191
lint-cpp: tools/.cpplintstamp
11871192

11881193
tools/.cpplintstamp: $(LINT_CPP_FILES)
11891194
@echo "Running C++ linter..."
1190-
@$(PYTHON) tools/cpplint.py --quiet $?
1195+
@$(PYTHON) tools/cpplint.py $(CPPLINT_QUIET) $?
11911196
@$(PYTHON) tools/check-imports.py
11921197
@touch $@
11931198

11941199
lint-addon-docs: test/addons/.docbuildstamp
11951200
@echo "Running C++ linter on addon docs..."
1196-
@$(PYTHON) tools/cpplint.py --quiet --filter=$(ADDON_DOC_LINT_FLAGS) $(LINT_CPP_ADDON_DOC_FILES_GLOB)
1201+
@$(PYTHON) tools/cpplint.py $(CPPLINT_QUIET) --filter=$(ADDON_DOC_LINT_FLAGS) \
1202+
$(LINT_CPP_ADDON_DOC_FILES_GLOB)
11971203

11981204
cpplint: lint-cpp
11991205
@echo "Please use lint-cpp instead of cpplint"

0 commit comments

Comments
 (0)
Please sign in to comment.