@@ -1414,7 +1414,6 @@ LINT_CPP_ADDON_DOC_FILES = $(wildcard $(LINT_CPP_ADDON_DOC_FILES_GLOB))
14141414LINT_CPP_EXCLUDE  ?=
14151415LINT_CPP_EXCLUDE  += src/node_root_certs.h
14161416LINT_CPP_EXCLUDE  += $(LINT_CPP_ADDON_DOC_FILES ) 
1417- LINT_CPP_EXCLUDE  += $(wildcard  test/js-native-api/??_* /* .cc test/js-native-api/??_* /* .h test/node-api/??_* /* .cc test/node-api/??_* /* .h) 
14181417#  These files were copied more or less verbatim from V8.
14191418LINT_CPP_EXCLUDE  += src/tracing/trace_event.h src/tracing/trace_event_common.h
14201419
@@ -1434,9 +1433,7 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
14341433	test/embedding/* .h \ 
14351434	test/fixtures/* .c \ 
14361435	test/js-native-api/* /* .cc \ 
1437- 	test/js-native-api/* /* .h \ 
14381436	test/node-api/* /* .cc \ 
1439- 	test/node-api/* /* .h \ 
14401437	tools/icu/* .cc \ 
14411438	tools/icu/* .h \ 
14421439	tools/code_cache/* .cc \ 
@@ -1445,6 +1442,16 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
14451442	tools/snapshot/* .h \ 
14461443	) )
14471444
1445+ FORMAT_CPP_FILES  ?=
1446+ FORMAT_CPP_FILES  += $(LINT_CPP_FILES ) 
1447+ #  C source codes.
1448+ FORMAT_CPP_FILES  += $(wildcard  \ 
1449+ 	test/js-native-api/* /* .c \ 
1450+ 	test/js-native-api/* /* .h \ 
1451+ 	test/node-api/* /* .c \ 
1452+ 	test/node-api/* /* .h \ 
1453+ 	) 
1454+ 
14481455#  Code blocks don't have newline at the end,
14491456#  and the actual filename is generated so it won't match header guards
14501457ADDON_DOC_LINT_FLAGS =-whitespace/ending_newline,-build/header_guard
@@ -1473,7 +1480,7 @@ ifneq ("","$(wildcard tools/clang-format/node_modules/)")
14731480		--binary=tools/clang-format/node_modules/.bin/clang-format \
14741481		--style=file \
14751482		$(CLANG_FORMAT_START) -- \
1476- 		$(LINT_CPP_FILES )
1483+ 		$(FORMAT_CPP_FILES )
14771484else 
14781485	$(info Required tooling for C++ code formatting is not installed.)
14791486	$(info To install (requires internet access) run: $$ make format-cpp-build)
0 commit comments