Skip to content

Commit 005c087

Browse files
committed
chore: update golangci-lint to version 1.42, fix linter warnings
1 parent f9df799 commit 005c087

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

.golangci.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,10 @@ linters-settings:
1414
check-type-assertions: false
1515
check-blank: false
1616
exclude: ./errcheck_excludes.txt
17-
golint:
18-
min-confidence: 0.8
1917
gofmt:
2018
simplify: true
2119
goimports:
2220
local-prefixes: gitlab.com/postgres-ai/database-lab
23-
maligned:
24-
suggest-new: true
2521
dupl:
2622
threshold: 120
2723
goconst:
@@ -30,6 +26,12 @@ linters-settings:
3026
lll:
3127
line-length: 140
3228
tab-width: 1
29+
gomnd:
30+
settings:
31+
mnd:
32+
ignored-functions: strconv.Format*,os.*
33+
revive:
34+
min-confidence: 0.8
3335
unused:
3436
check-exported: false
3537
unparam:
@@ -59,16 +61,15 @@ linters:
5961
- goconst
6062
- gocritic
6163
- goimports
62-
- golint
6364
- gomnd
6465
- gosimple
6566
- govet
6667
- ineffassign
6768
- lll
68-
- maligned
6969
- megacheck
7070
- misspell
7171
- prealloc
72+
- revive
7273
- structcheck
7374
- stylecheck
7475
- unconvert

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ all: clean build
3030

3131
# Install the linter to $GOPATH/bin which is expected to be in $PATH
3232
install-lint:
33-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.35.2
33+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.42.1
3434

3535
run-lint:
3636
golangci-lint run

pkg/log/log.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"os"
1212
)
1313

14-
var debugMode bool = true
14+
var debugMode = true
1515

1616
var std = log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile)
1717

0 commit comments

Comments
 (0)