@@ -1405,7 +1405,6 @@ LINT_CPP_ADDON_DOC_FILES = $(wildcard $(LINT_CPP_ADDON_DOC_FILES_GLOB))
1405
1405
LINT_CPP_EXCLUDE ?=
1406
1406
LINT_CPP_EXCLUDE += src/node_root_certs.h
1407
1407
LINT_CPP_EXCLUDE += $(LINT_CPP_ADDON_DOC_FILES )
1408
- LINT_CPP_EXCLUDE += $(wildcard test/js-native-api/??_* /* .cc test/js-native-api/??_* /* .h test/node-api/??_* /* .cc test/node-api/??_* /* .h)
1409
1408
# These files were copied more or less verbatim from V8.
1410
1409
LINT_CPP_EXCLUDE += src/tracing/trace_event.h src/tracing/trace_event_common.h
1411
1410
@@ -1425,9 +1424,7 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
1425
1424
test/embedding/* .h \
1426
1425
test/fixtures/* .c \
1427
1426
test/js-native-api/* /* .cc \
1428
- test/js-native-api/* /* .h \
1429
1427
test/node-api/* /* .cc \
1430
- test/node-api/* /* .h \
1431
1428
tools/icu/* .cc \
1432
1429
tools/icu/* .h \
1433
1430
tools/code_cache/* .cc \
@@ -1436,6 +1433,16 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
1436
1433
tools/snapshot/* .h \
1437
1434
) )
1438
1435
1436
+ FORMAT_CPP_FILES ?=
1437
+ FORMAT_CPP_FILES += $(LINT_CPP_FILES )
1438
+ # C source codes.
1439
+ FORMAT_CPP_FILES += $(wildcard \
1440
+ test/js-native-api/* /* .c \
1441
+ test/js-native-api/* /* .h \
1442
+ test/node-api/* /* .c \
1443
+ test/node-api/* /* .h \
1444
+ )
1445
+
1439
1446
# Code blocks don't have newline at the end,
1440
1447
# and the actual filename is generated so it won't match header guards
1441
1448
ADDON_DOC_LINT_FLAGS =-whitespace/ending_newline,-build/header_guard
@@ -1464,7 +1471,7 @@ ifneq ("","$(wildcard tools/clang-format/node_modules/)")
1464
1471
--binary=tools/clang-format/node_modules/.bin/clang-format \
1465
1472
--style=file \
1466
1473
$(CLANG_FORMAT_START) -- \
1467
- $(LINT_CPP_FILES )
1474
+ $(FORMAT_CPP_FILES )
1468
1475
else
1469
1476
$(info Required tooling for C++ code formatting is not installed.)
1470
1477
$(info To install (requires internet access) run: $$ make format-cpp-build)
0 commit comments