Skip to content

Commit 3558344

Browse files
authored
Using golangci-lint-action and gopfumpt in .github/workflows/lint.yml (#24)
1 parent 41af4e3 commit 3558344

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/lint.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,20 @@ jobs:
5050
go mod verify
5151
go mod download
5252
53-
curl -fsSL https://github.com/golangci/golangci-lint/releases/download/v${LINT_VERSION}/golangci-lint-${LINT_VERSION}-linux-amd64.tar.gz | \
54-
tar xz --strip-components 1 --wildcards \*/golangci-lint
55-
mkdir -p bin && mv golangci-lint bin/
56-
5753
- name: Run Lint checks
58-
run: |
59-
bin/golangci-lint run --out-format=github-actions --timeout=3m || exit $?
54+
uses: golangci/golangci-lint-action@v3
55+
with:
56+
version: v${{ env.LINT_VERSION }}
57+
install-mode: binary
6058

6159
- name: Build docs generator
6260
run: |
6361
go build -o bin/gen-docs cmd/gen-docs/gen-docs.go || exit $?
6462
63+
- name: Build gopfumpt
64+
run: |
65+
go install mvdan.cc/gofumpt@latest
66+
6567
- name: Run checks
6668
run: |
6769
STATUS=0
@@ -76,7 +78,7 @@ jobs:
7678
}
7779
7880
assert-nothing-changed ./bin/gen-docs --doc-path ./docs --website
79-
assert-nothing-changed go fmt ./...
81+
assert-nothing-changed gofumpt -l -w .
8082
assert-nothing-changed go mod tidy
8183
8284
exit $STATUS

0 commit comments

Comments
 (0)