Add verify format

This commit is contained in:
Shiming Zhang
2021-12-24 15:38:27 +08:00
parent 27d0d13783
commit 070c31d28a
3 changed files with 25 additions and 1 deletions

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash
cat $1 | sort | tac > $1.tmp && mv $1.tmp $1
cat $1 | sort -u | grep -v '^$' > $1.tmp && mv $1.tmp $1

7
hack/verify-fmt.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
cp $1 $1.bak
./hack/fmt.sh $1
diff -c $1 $1.bak
rm $1.bak