-
Notifications
You must be signed in to change notification settings - Fork 14
120 lines (108 loc) · 2.82 KB
/
lint.yaml
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: lint
on:
pull_request:
paths-ignore:
- 'vendor/*'
branches:
- main
- release-*
# cancel the in-progress workflow when PR is refreshed.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
permissions:
contents: read
jobs:
codespell:
name: codespell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: codespell
uses: codespell-project/actions-codespell@master
with:
skip: .git,*.sum,vendor
ignore_words_list: AfterAll,NotIn,notin,immediatedly
check_filenames: true
check_hidden: true
misspell:
name: misspell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: misspell
uses: reviewdog/action-misspell@v1
with:
exclude: ./vendor/*
golangci:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.55
# Optional: golangci-lint command line arguments.
args: --config=.golangci.yml
# actions/setup-go already handles caching
skip-cache: true
govulncheck:
name: govulncheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: govulncheck
uses: golang/govulncheck-action@v1
markdownlint:
name: markdownlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: DavidAnson/markdownlint-cli2-action@v16
with:
config: .markdownlint.yaml
globs: 'docs/*.md'
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
severity: warning
check_together: 'yes'
ignore_paths: 'vendor'
disable_matcher: false
format: gcc
modcheck:
name: modcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
name: run mod check
run: make mod.check