-
Notifications
You must be signed in to change notification settings - Fork 333
88 lines (73 loc) · 2.09 KB
/
Copy pathvectorlint.yml
File metadata and controls
88 lines (73 loc) · 2.09 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Vector Lint
permissions:
contents: read
on:
push:
pull_request:
jobs:
govulncheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-go@v6
with:
go-version: stable
- uses: geomys/sandboxed-step@v1.2.1
with:
run: go run golang.org/x/vuln/cmd/govulncheck@latest ./...
gostaticcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-go@v6
with:
go-version: stable
- uses: geomys/sandboxed-step@v1.2.1
with:
run: go run honnef.co/go/tools/cmd/staticcheck@latest ./...
golint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Check if modules are tidy
run: |
go mod tidy
if [ -n "$(git status --porcelain go.mod go.sum)" ]; then
echo "go.mod or go.sum are not tidy. Please run 'go mod tidy' locally and commit changes."
git diff go.mod go.sum
exit 1
fi
- name: Verify Go formatting
# 'gofmt -l .' to list files whose formatting differs from gofmt's
# 'test -z' to verify that the output is empty
run: test -z "$(gofmt -l .)"
vectorlint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Verify JSON formatting
run: ./tools/reformat_json.py && git diff --exit-code
- name: Run vectorlint
run: go run ./tools/vectorlint
- name: Run twistcheck
run: go run ./tools/twistcheck
- name: Run schemagen
run: go run ./tools/schemagen