Skip to content

Commit 0fb6876

Browse files
committed
Fix bug where build_test_all was wasting time formatting generated headers
1 parent bf6e0ea commit 0fb6876

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

build_test_all.cmd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ goto :post_format
2727
goto :eof
2828

2929
:run_clang_format
30+
set filePath=%1
31+
:: The test subfolder has obj directories with many redundant copies of generated cppwinrt headers. The
32+
:: cost of formatting these files is vastly higher than the cost of formatting the code that is checked in
33+
:: to this repo. Skip any file path with "obj" as a substring.
34+
if not !filePath:obj!==!filePath! (
35+
goto :eof
36+
)
37+
echo Formatting !filePath!
3038
"%CLANG_FORMAT%" -style=file -i %1
3139
goto :eof
3240

0 commit comments

Comments
 (0)