Skip to content

Commit 8f93e33

Browse files
author
Eduardo Gomes
committed
Bump golangci/golangci-lint-action to fix CI errors
1 parent d5bd4b9 commit 8f93e33

File tree

2 files changed

+46
-29
lines changed

2 files changed

+46
-29
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
path: ~/go/pkg/mod
1818
key: ${{ runner.os }}-go${{ matrix.go-version }}-${{ hashFiles('**/go.mod') }}-${{ hashFiles('**/go.sum') }}
1919
- name: golangci-lint
20-
uses: golangci/golangci-lint-action@v6
20+
uses: golangci/golangci-lint-action@v8
2121
with:
2222
version: latest
2323
args: "--config .golintci.yaml"

.golintci.yaml

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,50 @@
1+
version: "2"
12
run:
2-
timeout: 5m
3+
modules-download-mode: readonly
34
issues-exit-code: 1
45
tests: true
5-
skip-dirs-use-default: true
6-
modules-download-mode: readonly
7-
6+
output:
7+
formats:
8+
text:
9+
path: stdout
810
linters:
911
enable:
10-
- bodyclose # ensure HTTP response bodies are successfully closed.
11-
- contextcheck # check we are passing context an inherited context.
12-
- gofmt # checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification.
13-
- errname # checks that sentinel errors are prefixed with the `Err`` and error types are suffixed with the `Error``.
14-
- errorlint # used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
15-
- godot # check if comments end in a period.
16-
- misspell # finds commonly misspelled English words in comments.
17-
- nilerr # checks that there is no simultaneous return of nil error and an invalid value.
18-
- tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes.
19-
- unparam # reports unused function parameters.
20-
- whitespace # detection of leading and trailing whitespace.
21-
- gosec # inspects source code for security problems.
22-
- bidichk # checks for dangerous unicode character sequences.
23-
- exportloopref # prevent scope issues with pointers in loops.
24-
- goconst # use constants where values are repeated.
25-
- reassign # checks that package variables are not reassigned.
26-
- goimports # checks import grouping and code formatting.
27-
28-
output:
29-
format: colored-line-number
30-
31-
linters-settings:
32-
goconst:
33-
ignore-tests: true
12+
- bidichk
13+
- bodyclose
14+
- contextcheck
15+
- errname
16+
- errorlint
17+
- goconst
18+
- godot
19+
- gosec
20+
- misspell
21+
- nilerr
22+
- reassign
23+
- tparallel
24+
- unparam
25+
- whitespace
26+
exclusions:
27+
generated: lax
28+
presets:
29+
- comments
30+
- common-false-positives
31+
- legacy
32+
- std-error-handling
33+
rules:
34+
- linters:
35+
- goconst
36+
path: (.+)_test\.go
37+
paths:
38+
- third_party$
39+
- builtin$
40+
- examples$
41+
formatters:
42+
enable:
43+
- gofmt
44+
- goimports
45+
exclusions:
46+
generated: lax
47+
paths:
48+
- third_party$
49+
- builtin$
50+
- examples$

0 commit comments

Comments
 (0)