@@ -1414,7 +1414,6 @@ LINT_CPP_ADDON_DOC_FILES = $(wildcard $(LINT_CPP_ADDON_DOC_FILES_GLOB))
1414
1414
LINT_CPP_EXCLUDE ?=
1415
1415
LINT_CPP_EXCLUDE += src/node_root_certs.h
1416
1416
LINT_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)
1418
1417
# These files were copied more or less verbatim from V8.
1419
1418
LINT_CPP_EXCLUDE += src/tracing/trace_event.h src/tracing/trace_event_common.h
1420
1419
@@ -1434,9 +1433,7 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
1434
1433
test/embedding/* .h \
1435
1434
test/fixtures/* .c \
1436
1435
test/js-native-api/* /* .cc \
1437
- test/js-native-api/* /* .h \
1438
1436
test/node-api/* /* .cc \
1439
- test/node-api/* /* .h \
1440
1437
tools/icu/* .cc \
1441
1438
tools/icu/* .h \
1442
1439
tools/code_cache/* .cc \
@@ -1445,6 +1442,16 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
1445
1442
tools/snapshot/* .h \
1446
1443
) )
1447
1444
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
+
1448
1455
# Code blocks don't have newline at the end,
1449
1456
# and the actual filename is generated so it won't match header guards
1450
1457
ADDON_DOC_LINT_FLAGS =-whitespace/ending_newline,-build/header_guard
@@ -1473,7 +1480,7 @@ ifneq ("","$(wildcard tools/clang-format/node_modules/)")
1473
1480
--binary=tools/clang-format/node_modules/.bin/clang-format \
1474
1481
--style=file \
1475
1482
$(CLANG_FORMAT_START) -- \
1476
- $(LINT_CPP_FILES )
1483
+ $(FORMAT_CPP_FILES )
1477
1484
else
1478
1485
$(info Required tooling for C++ code formatting is not installed.)
1479
1486
$(info To install (requires internet access) run: $$ make format-cpp-build)
0 commit comments