mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-14 10:23:02 +03:00
Check files with go fmt in CI
This commit is contained in:
parent
d72f1c85c1
commit
a02c813784
@ -20,6 +20,7 @@ env:
|
||||
- GO15VENDOREXPERIMENT=1
|
||||
|
||||
before_install:
|
||||
- ./script/check_formatting.sh
|
||||
- ./script/check_assets.sh
|
||||
|
||||
install:
|
||||
|
13
script/check_formatting.sh
Executable file
13
script/check_formatting.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
files="$(go fmt ./...)"
|
||||
ignore="pkg/data/bindata.go"
|
||||
files=${files[@]/$ignore}
|
||||
|
||||
if [ -n "$files" ]; then
|
||||
echo "Go code is not formatted: $files"
|
||||
for file in $files; do
|
||||
echo "----> $file"
|
||||
done
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in New Issue
Block a user