mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-28 14:17:17 +00:00
53b0c0f7ab
* adds gofmt checker action to GitHub workflow * gofmt applied
16 lines
300 B
Bash
Executable File
16 lines
300 B
Bash
Executable File
#!/bin/sh -l
|
|
set -e
|
|
|
|
cd $GITHUB_WORKSPACE
|
|
|
|
# Check if any files are not formatted.
|
|
nonformatted="$(gofmt -l $1 2>&1)"
|
|
|
|
# Return if `go fmt` passes.
|
|
[ -z "$nonformatted" ] && exit 0
|
|
|
|
# Notify of issues with formatting.
|
|
echo "Following files need to be properly formatted:"
|
|
echo "$nonformatted"
|
|
exit 1
|