source: pacpusframework/trunk/scripts/format-sources.bat@ 310

Last change on this file since 310 was 167, checked in by Marek Kurdej, 11 years ago

Added: .clang-format configuration script and a short batch script to invoke formatting tool on all source files.

File size: 517 bytes
Line 
1@echo off
2
3:parameters
4set SCRIPTS_DIR=%CD%
5set DIRECTORIES=..\examples ..\include ..\src
6set FILES_TO_UPDATE=*.h *.c *.hpp *.cpp *.hxx *.cxx *.cc *.tcc
7
8:scan
9:: for all directories
10for %%D in (%DIRECTORIES%) do (
11 echo Scanning directory '%%D'
12
13 cd %SCRIPTS_DIR%
14 cd %%D
15 :: find source files
16 :: update each file
17 for /R %%E in (%FILES_TO_UPDATE%) do (
18 echo Formatting file '%%E'
19 clang-format -i --style=file %%E
20 )
21)
22
23:exit
24cd %SCRIPTS_DIR%
25pause
Note: See TracBrowser for help on using the repository browser.