Skip to content

Commit 7df513f

Browse files
committed
go: upgrade golangci-lint, disable lll, enable gofmt, govet
1 parent e45d26e commit 7df513f

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

.golangci.toml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version = "2"
2+
3+
[linters]
4+
enable = [ "gocritic", "govet" ]
5+
6+
[linters.exclusions]
7+
generated = "lax"
8+
presets = [
9+
"comments",
10+
"common-false-positives",
11+
"legacy",
12+
"std-error-handling"
13+
]
14+
paths = [ "third_party$", "builtin$", "examples$" ]
15+
16+
[formatters]
17+
enable = [ "goimports", "gofmt" ]
18+
19+
[formatters.exclusions]
20+
generated = "lax"
21+
paths = [ "third_party$", "builtin$", "examples$" ]

.golangci.yml

-13
This file was deleted.

test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ go test -count=1 "$@" ./...
66

77
# Run linters
88
# Configure linters in .golangci.yml
9-
expected_version=1.64.5
9+
expected_version=2.0.2
1010
expected_version_full=v"$expected_version"
1111
golangci_lint_bin=./bin/golangci-lint
1212
if ! "$golangci_lint_bin" version | grep -wq "version $expected_version"; then

0 commit comments

Comments
 (0)