mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-07 01:06:48 +08:00
clang-format
This commit is contained in:
parent
9049a1a511
commit
c94d3a048c
28
format.cmd
28
format.cmd
@ -1,7 +1,25 @@
|
|||||||
@echo off
|
@echo off
|
||||||
echo Formatting with config...
|
setlocal enabledelayedexpansion
|
||||||
for /R ".\" %%f in (*.cpp, *.h, *.c, *.hpp) do (
|
|
||||||
echo Formatting "%%f"
|
echo Searching for clang-format...
|
||||||
clang-format -i -style=file "%%f"
|
where clang-format >nul 2>&1
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo Error: clang-format not found in PATH. Install LLVM or add it to PATH.
|
||||||
|
exit /b 1
|
||||||
)
|
)
|
||||||
echo Done!
|
|
||||||
|
echo Checking for .clang-format...
|
||||||
|
if not exist ".clang-format" (
|
||||||
|
echo Error: .clang-format config file not found in the current directory.
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Formatting files with .clang-format...
|
||||||
|
set count=0
|
||||||
|
for /R ".\" %%f in (*.cpp, *.h, *.c, *.hpp) do (
|
||||||
|
echo Formatting "%%f"
|
||||||
|
clang-format -i -style=file "%%f"
|
||||||
|
set /a count+=1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Done. Proccesed !count! files.
|
||||||
Loading…
x
Reference in New Issue
Block a user