25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-24 17:29:28 +01:00

Format also files in test/

This commit is contained in:
Badlop 2024-05-06 13:41:23 +02:00
parent f28e7b37bc
commit 35783d9a2c

View File

@ -11,13 +11,16 @@
REBAR=$1
ERLS=$(git grep --name-only @format-begin src/)
FORMAT()
{
FPATH=$1
ERLS=$(git grep --name-only @format-begin "$FPATH"/)
for ERL in $ERLS; do
csplit --quiet --prefix=$ERL-format- $ERL /@format-/ "{*}"
done
EFMTS=$(find src/*-format-* -type f -exec grep --files-with-matches "@format-begin" '{}' ';')
EFMTS=$(find "$FPATH"/*-format-* -type f -exec grep --files-with-matches "@format-begin" '{}' ';')
EFMTS2=""
for EFMT in $EFMTS; do
EFMTS2="$EFMTS2 --files $EFMT"
@ -32,3 +35,7 @@ for ERL in $ERLS; do
rm $SPLIT
done
done
}
FORMAT src
FORMAT test