You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:: This script is a more invasive version of formatting all files in the repo with clang-format. It will format files that have not
6
+
:: been modified locally. It is mainly intended to be a "reformat everything" script for when .clang-format is modified.
7
+
8
+
call"%~dp0/find_clang_format.cmd"
9
+
if%ERRORLEVEL%neq0exit /b %ERRORLEVEL%
10
+
11
+
ifexist".\test\nuget\obj" (
12
+
echo Warning: test\nuget\obj subfolder exists and will have large numbers of header files. It is recommended to delete that folder before running this script.
13
+
pause
14
+
)
15
+
16
+
setDIRS=cppwinrt fast_fwd natvis prebuild scratch strings test vsix
17
+
setEXTS=.cpp .h
18
+
for%%din (%DIRS%) docall :format_files%~dp0%%d
19
+
20
+
:format_files
21
+
for%%ein (%EXTS%) do (
22
+
for /R %1%%fin (*%%e) docall :run_clang_format"%%f"
23
+
)
24
+
goto :eof
25
+
26
+
:run_clang_format
27
+
setfilePath=%1
28
+
:: The test subfolder has obj directories with many redundant copies of generated cppwinrt headers. The
29
+
:: cost of formatting these files is vastly higher than the cost of formatting the code that is checked in
30
+
:: to this repo. Skip any file path with "obj" as a substring.
31
+
setIGNORED=
32
+
for /F "tokens=*"%%gin ('git check-ignore %1') do (set IGNORED=%%g)
0 commit comments