-
Notifications
You must be signed in to change notification settings - Fork 43
55 lines (52 loc) · 1.39 KB
/
linter.yaml
File metadata and controls
55 lines (52 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: linter
on:
push:
branches: [main]
pull_request:
env:
GOLANGCI_LINT_VERSION: v2.7.2
jobs:
golangcilint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.25"
- name: Lint main module
uses: golangci/golangci-lint-action@v8
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
- name: Validate generated sources
run: |
go generate ./...
git diff --exit-code
- name: Validate main go.mod
run: |
go mod tidy -compat=1.20 && git diff --exit-code
- name: Lint x/sqlite module
uses: golangci/golangci-lint-action@v8
env:
GOWORK: "off"
with:
working-directory: ./x/sqlite
version: ${{ env.GOLANGCI_LINT_VERSION }}
- name: Validate x/sqlite go.mod
env:
GOWORK: "off"
run: |
cd x/sqlite && go mod tidy && git diff --exit-code
- name: Lint x/pg module
uses: golangci/golangci-lint-action@v8
env:
GOWORK: "off"
with:
working-directory: ./x/pg
version: ${{ env.GOLANGCI_LINT_VERSION }}
- name: Validate x/pg go.mod
env:
GOWORK: "off"
run: |
cd x/pg && go mod tidy && git diff --exit-code