format with .uncrustify.cfg (#1759)

* format with .uncrustify.cfg

format with .uncrustify.cfg

* format with .uncrustify.cfg

* format with .uncrustify.cfg exclude json.* base64.* uthash.h

* format with .uncrustify.cfg exclude json.* base64.* uthash.h
This commit is contained in:
星野ハジメ
2017-10-30 21:28:53 +08:00
committed by Max Lv
parent 26ae365f7b
commit cc1bb4cf62
22 changed files with 501 additions and 419 deletions
+35
View File
@@ -0,0 +1,35 @@
@echo off
set root=%~dp0
set source=%root%src
goto start
:format
set filelist=%1
for /r "%filelist%" %%f in (*) do (
if "%%~xf" equ ".h" (
call :format_file %%f
) else if "%%~xf" equ ".c" (
call :format_file %%f
)
)
goto end
:format_file
set f=%1
if "%~n1" neq "base64" (
if "%~n1" neq "json" (
if "%~n1" neq "uthash" (
echo 'format file "%f%"'
uncrustify -c %root%\.uncrustify.cfg -l C --replace --no-backup %f%
DEL %~dp1*.uncrustify >nul 2>nul
)
)
)
goto end
:start
call :format %source%
:end