mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
add reformatting config files and shell script
This commit is contained in:
parent
d9cc967508
commit
52a1739e7c
26
reformat.sh
Executable file
26
reformat.sh
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
DIR=$1
|
||||||
|
|
||||||
|
function format_cpp {
|
||||||
|
echo 'format_cpp' $1
|
||||||
|
uncrustify --no-backup -c uncrustify_cpp.cfg $1
|
||||||
|
}
|
||||||
|
|
||||||
|
function format_header {
|
||||||
|
echo 'format_header' $1
|
||||||
|
uncrustify --no-backup -c uncrustify_headers.cfg $1
|
||||||
|
}
|
||||||
|
|
||||||
|
PDEFILES=`find $DIR -name '*.pde' -print`
|
||||||
|
CPPFILES=`find $DIR -name '*.cpp' -print`
|
||||||
|
CFILES=`find $DIR -name '*.c' -print`
|
||||||
|
HFILES=`find $DIR -name '*.h' -print`
|
||||||
|
|
||||||
|
for f in $PDEFILES $CPPFILES $CFILES; do
|
||||||
|
format_cpp $f
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
for f in $HFILES; do
|
||||||
|
format_header $f
|
||||||
|
done
|
1434
uncrustify_cpp.cfg
Normal file
1434
uncrustify_cpp.cfg
Normal file
File diff suppressed because it is too large
Load Diff
1434
uncrustify_headers.cfg
Normal file
1434
uncrustify_headers.cfg
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user