Skip to content

Commit 5422007

Browse files
committed
tools: run format-cpp on node-api test c files
1 parent 825efe5 commit 5422007

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile

+8-1
Original file line numberDiff line numberDiff line change
@@ -1436,6 +1436,13 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
14361436
tools/snapshot/*.h \
14371437
))
14381438

1439+
FORMAT_CPP_FILES ?=
1440+
FORMAT_CPP_FILES += $(LINT_CPP_FILES)
1441+
FORMAT_CPP_FILES += $(wildcard \
1442+
test/js-native-api/*/*.c \
1443+
test/node-api/*/*.c \
1444+
)
1445+
14391446
# Code blocks don't have newline at the end,
14401447
# and the actual filename is generated so it won't match header guards
14411448
ADDON_DOC_LINT_FLAGS=-whitespace/ending_newline,-build/header_guard
@@ -1464,7 +1471,7 @@ ifneq ("","$(wildcard tools/clang-format/node_modules/)")
14641471
--binary=tools/clang-format/node_modules/.bin/clang-format \
14651472
--style=file \
14661473
$(CLANG_FORMAT_START) -- \
1467-
$(LINT_CPP_FILES)
1474+
$(FORMAT_CPP_FILES)
14681475
else
14691476
$(info Required tooling for C++ code formatting is not installed.)
14701477
$(info To install (requires internet access) run: $$ make format-cpp-build)

0 commit comments

Comments
 (0)