Test drone
This commit is contained in:
parent
378256de47
commit
9fd57ab42b
4 changed files with 70 additions and 5 deletions
18
hack/validate_gofmt.sh
Executable file
18
hack/validate_gofmt.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
badFiles=($(find ./ -iname "*.go" -exec gofmt -s -l {} \;))
|
||||
|
||||
if [ ${#badFiles[@]} -eq 0 ]; then
|
||||
echo 'Congratulations! All Go source files are properly formatted.'
|
||||
else
|
||||
{
|
||||
echo "These files are not properly gofmt'd:"
|
||||
for f in "${badFiles[@]}"; do
|
||||
echo " - $f"
|
||||
done
|
||||
echo
|
||||
echo 'Please reformat the above files using "gofmt -s -w" and commit the result.'
|
||||
echo
|
||||
} >&2
|
||||
false
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue