2
0
mirror of https://github.com/team2059/Dent synced 2024-12-18 20:52:29 -05:00

Added autoformat script/documentation

This commit is contained in:
Austen Adler 2015-07-31 12:52:03 -04:00
parent abff070940
commit b465ab4304
2 changed files with 12 additions and 0 deletions

View File

@ -68,3 +68,7 @@
5. Same as auto 4, but navigate around bins (not implemented)
6. Collect 1 bin then 1 tote (not implemented)
7. Collect 3 totes, collect bin, drive to AutoZone (not implemented)
### Contributing
This project uses [1TBS](https://en.wikipedia.org/wiki/1TBS) (Astyle Google variant with -j) and the `-xc -xn -xl -xG -j -s2 -C -S -K -N` [Astyle (2.04+)](http://astyle.sourceforge.net/) flags.

8
autoformat.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/zsh
\cd "$(dirname "$0")">/dev/null
if which colout>/dev/null; then
astyle -xc -A14 -s2 -j -xG -S -K -N -xn -xl -n **/*.{cpp,h}|\grep -P '^(?!Unchanged)'|colout '(Formatted)' green
else
astyle -xc -A14 -s2 -j -xG -S -K -N -xn -xl -n **/*.{cpp,h}|\grep -P '^(?!Unchanged)'
fi
\cd ->/dev/null