Skip to content

Commit 53d6206

Browse files
committed
chore: add workflow to use golangci as a linter
1 parent 791d68a commit 53d6206

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,22 @@ on:
88
branches:
99
- main
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
15+
golangci:
16+
name: lint
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-go@v5
21+
with:
22+
go-version: 1.22
23+
- name: golangci-lint
24+
uses: golangci/golangci-lint-action@v6
25+
with:
26+
version: v1.60
1227
helm-lint:
1328
runs-on: ubuntu-latest
1429
steps:

.golangci.yaml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
linters:
2+
disable-all: true
3+
enable:
4+
- asasalint
5+
- asciicheck
6+
- bidichk
7+
- bodyclose
8+
- dogsled
9+
- durationcheck
10+
- dupword
11+
- errcheck
12+
- copyloopvar
13+
- errchkjson
14+
- goconst
15+
- gofmt
16+
- sloglint
17+
- goheader
18+
- goimports
19+
- goprintffuncname
20+
- gosec
21+
- gosimple
22+
- gocritic
23+
- govet
24+
- ginkgolinter
25+
- importas
26+
- ineffassign
27+
- misspell
28+
- nakedret
29+
- nosprintfhostport
30+
- nilerr
31+
- noctx
32+
- nolintlint
33+
- revive
34+
- staticcheck
35+
- stylecheck
36+
- testifylint
37+
- tparallel
38+
- thelper
39+
- typecheck
40+
- unconvert
41+
- unparam
42+
- unused
43+
- usestdlibvars
44+
- whitespace
45+
- wrapcheck
46+
- tagliatelle
47+
- sqlclosecheck
48+
- promlinter
49+
- prealloc
50+
- contextcheck
51+
52+
linters-settings:
53+
gocritic:
54+
disabled-checks: [captLocal]
55+
revive:
56+
rules:
57+
- name: blank-imports
58+
disabled: true
59+
issues: {}
60+
run:
61+
timeout: 5m

0 commit comments

Comments
 (0)