14 lines
244 B
Plaintext
14 lines
244 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
set -e
|
||
|
|
||
|
filesToFormat=$(
|
||
|
git --no-pager diff --name-status --no-color --cached | \
|
||
|
awk '$1 != "D" && $2 ~ /\.hs/ {print $NF}'
|
||
|
)
|
||
|
|
||
|
for path in $filesToFormat
|
||
|
do
|
||
|
google-java-format --replace $path
|
||
|
git add $path
|
||
|
done;
|