Add verification scripts for clang-format

The scripts are very light on error handling and verification, mostly
intended just to debug if a CI server fails on formatting reasons.
This commit is contained in:
Vasily
2018-12-28 03:01:45 +01:00
parent 7c5146b05e
commit 86a0dae70b
2 changed files with 24 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
@echo off
REM Arg 0 (called %0) is the full path to the file.
REM https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/call#batch-parameters
REM As per above link, %~dp0 expands the zeroth arg to a drive letter and path only.
REM Project dir is up two dirs from the file.
SET project_dir=%~dp0\..\..\
python %project_dir%/build_scripts/run-clang-format.py %project_dir%/src -r --color never --clang-format-executable %CLANG_FORMAT_LOC%
IF NOT ERRORLEVEL 1 THEN ECHO FORMATTED CORRECTLY.