tomlplusplus/tools/clang_format.bat
Mark Gillard dbc078202d removed internal operator""_sz (ADL is a cruel mistress)
also:
- applied clang-format to tests
- added some missing `TOML_API`
2021-10-26 16:49:23 +03:00

35 lines
769 B
Batchfile

@ECHO off
SETLOCAL enableextensions enabledelayedexpansion
PUSHD .
CD /d "%~dp0\.."
REM --------------------------------------------------------------------------------------
REM Runs clang format on all the non-test C++ files in the project
REM --------------------------------------------------------------------------------------
CALL :RunClangFormatOnDirectories ^
include\toml++ ^
include\toml++\impl ^
tests ^
examples
GOTO FINISH
:RunClangFormatOnDirectories
(
FOR %%i IN (%*) DO (
IF EXIST "%%~i" (
ECHO Formatting files in "%%~i"
clang-format --style=file -i "%%~i\*.cpp" >nul 2>&1
clang-format --style=file -i "%%~i\*.h" >nul 2>&1
clang-format --style=file -i "%%~i\*.inl" >nul 2>&1
)
)
EXIT /B
)
:FINISH
POPD
@ENDLOCAL
EXIT /B 0