File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change 7
7
- main
8
8
pull_request :
9
9
10
- permissions :
11
- # golangci-lint does annotations, not comments
12
- # No-one knows what an annotation is, but I suspect it's printing file:line: msg to stdout.
13
- # https://github.community/t/what-are-annotations/16173/2
14
- checks : none
15
-
16
10
jobs :
17
11
golangci :
18
12
name : lint
19
13
runs-on : ubuntu-latest
14
+ permissions :
15
+ # contents required to read the change
16
+ contents : read
17
+ # allow read access to any pull request
18
+ pull-requests : read
19
+ # golangci-lint does annotations, not comments, which needs `checks` to annotate the code.
20
+ # These are hidden in the code, and not visible as comments in the PR.
21
+ # https://github.com/golangci/golangci-lint-action/issues/5
22
+ # No-one knows what an annotation is, but I suspect it's printing file:line: msg to stdout.
23
+ # https://github.community/t/what-are-annotations/16173/2
24
+ checks : write
20
25
steps :
21
26
- uses : actions/checkout@v4
22
27
- uses : golangci/golangci-lint-action@v6
23
28
with :
24
29
# Required: the version of golangci-lint is required and must be
25
30
# specified without patch version: we always use the latest patch
26
31
# version.
27
- version : v1.57
32
+ version : v1.59
33
+ only-new-issues : ${{ github.event_name == 'pull_request' }}
Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ linters:
37
37
- depguard
38
38
- errcheck # handled by gosec, lots of false posi
39
39
- exhaustive # this false-positives for switches with a default
40
- - exhaustivestruct # too noisy, labelling fields is not my jam
41
40
- exhaustruct # above, renamed
42
41
- forbidigo # exclude non prod tools
43
42
- forcetypeassert # too many at the moment
@@ -48,13 +47,9 @@ linters:
48
47
- gocognit # boo cyclomatic complexity
49
48
- gocyclo # boo cyclomatic complexity
50
49
- godox # TODOs are fine
51
- - golint # deprecated
52
50
- gomnd # magic numbers in test tables are fine actually
53
51
- gosec # run independently
54
- - ifshort # buggy, false positives
55
- - interfacer # deprecated
56
52
- lll # go says long lines are ok, and this is trivially automatable
57
- - maligned # deprecated
58
53
- musttag # don't agree with the premise
59
54
- nakedret # weird thing to report on
60
55
- nestif # cognitive complexity
You can’t perform that action at this time.
0 commit comments