summaryrefslogtreecommitdiffstats
path: root/.github/workflows/lint.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/lint.yml')
-rw-r--r--.github/workflows/lint.yml6
1 files changed, 6 insertions, 0 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 25659077e..08e339d8d 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -12,3 +12,9 @@ jobs:
uses: golangci/golangci-lint-action@v2
with:
version: latest
+ - name: Format code
+ run: |
+ if [ $(find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;|wc -l) -gt 0 ]; then
+ find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;
+ exit 1
+ fi