Skip to content

Commit 9dc5e9c

Browse files
committed
feat(golangci): add linter and action to run golangci-lint
Currently running with the default config.
1 parent c31db8d commit 9dc5e9c

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: golangci-lint
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
golangci-lint:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
persist-credentials: false
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version-file: 'go.mod'
24+
cache: true
25+
26+
- name: Launch golangci-lint
27+
uses: golangci/golangci-lint-action@v6

script/lint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
set -e
44

55
go fmt ./...
6+
go mod tidy
7+
golangci-lint run --fix

0 commit comments

Comments
 (0)