Skip to content

Commit

Permalink
tools: run format-cpp on node-api test c files
Browse files Browse the repository at this point in the history
  • Loading branch information
legendecas committed Feb 17, 2023
1 parent 825efe5 commit 5422007
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1436,6 +1436,13 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
tools/snapshot/*.h \
))

FORMAT_CPP_FILES ?=
FORMAT_CPP_FILES += $(LINT_CPP_FILES)
FORMAT_CPP_FILES += $(wildcard \
test/js-native-api/*/*.c \
test/node-api/*/*.c \
)

# Code blocks don't have newline at the end,
# and the actual filename is generated so it won't match header guards
ADDON_DOC_LINT_FLAGS=-whitespace/ending_newline,-build/header_guard
Expand Down Expand Up @@ -1464,7 +1471,7 @@ ifneq ("","$(wildcard tools/clang-format/node_modules/)")
--binary=tools/clang-format/node_modules/.bin/clang-format \
--style=file \
$(CLANG_FORMAT_START) -- \
$(LINT_CPP_FILES)
$(FORMAT_CPP_FILES)
else
$(info Required tooling for C++ code formatting is not installed.)
$(info To install (requires internet access) run: $$ make format-cpp-build)
Expand Down

0 comments on commit 5422007

Please sign in to comment.