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
|
---|
4 | set SCRIPTS_DIR=%CD%
|
---|
5 | set DIRECTORIES=..\examples ..\include ..\src
|
---|
6 | set FILES_TO_UPDATE=*.h *.c *.hpp *.cpp *.hxx *.cxx *.cc *.tcc
|
---|
7 |
|
---|
8 | :scan
|
---|
9 | :: for all directories
|
---|
10 | for %%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
|
---|
24 | cd %SCRIPTS_DIR%
|
---|
25 | pause
|
---|
Note:
See
TracBrowser
for help on using the repository browser.