diff --git a/autoformat.sh b/autoformat.sh index 102b12e..0bf88be 100755 --- a/autoformat.sh +++ b/autoformat.sh @@ -9,6 +9,7 @@ GLOB=( **/*.java ) # -xc : Brace attached to class names # --style=google : google style (similar to 1tbs) # -j : Always add brackets (even on one line if statements) +# -z2 : Force Linux lineending # -s2 : Three spaces # -xG : Indent modifiers # -xe : Erase blank lines @@ -20,7 +21,7 @@ GLOB=( **/*.java ) # -n : Don't make a backup # -p : Pad operators # -H : Pad header (space after if, for, while) -OPTS=( --mode=java -xc --style=google -j -s2 -xG -xe -S -K -N -xn -xl -n -p -H ) +OPTS=( --mode=java -xc --style=google -j -z2 -s2 -xG -xe -S -K -N -xn -xl -n -p -H ) # Colorize output if you can if which colout>/dev/null; then astyle $OPTS $GLOB|\grep -P '^(?!Unchanged)'|colout '(Formatted)' green||true