Skip to content

Commit f002ee1

Browse files
authored
Merge pull request #4 from launchdarkly/eb/78747/linter-update
update golangci-lint
2 parents 38c1318 + 2ec2221 commit f002ee1

File tree

3 files changed

+41
-10
lines changed

3 files changed

+41
-10
lines changed

.golangci.yml

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,50 @@ run:
33
tests: false
44

55
linters:
6-
enable-all: true
7-
disable:
8-
- funlen # allow long/complex functions for now
9-
- gocognit # allow long/complex functions for now
6+
enable:
7+
- bodyclose
8+
- deadcode
9+
- depguard
10+
- dupl
11+
- errcheck
1012
- goconst
11-
- gomnd # extremely aggressive linter that complains about all numeric literals, even just adding 1 to something (https://github.com/tommy-muehle/go-mnd)
12-
- wsl # enforces a very specific style with an idiosyncratic definition of what "cuddling" is
13+
- gochecknoglobals
14+
- gochecknoinits
15+
- goconst
16+
- gocritic
17+
- gocyclo
18+
- godox
19+
- gofmt
20+
- goimports
21+
- golint
22+
- gosec
23+
- gosimple
24+
- govet
25+
- ineffassign
26+
- interfacer
27+
- lll
28+
- megacheck
29+
- misspell
30+
- nakedret
31+
- nolintlint
32+
- prealloc
33+
- staticcheck
34+
- structcheck
35+
- stylecheck
36+
- typecheck
37+
- unconvert
38+
- unparam
39+
- unused
40+
- varcheck
41+
- whitespace
1342
fast: false
1443

15-
linter-settings:
44+
linters-settings:
1645
gofmt:
1746
simplify: false
18-
47+
goimports:
48+
local-prefixes: gopkg.in/launchdarkly,github.com/launchdarkly
49+
1950
issues:
2051
exclude-use-default: false
2152
max-same-issues: 1000

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
GOLANGCI_LINT_VERSION=v1.23.7
2+
GOLANGCI_LINT_VERSION=v1.27.0
33

44
LINTER=./bin/golangci-lint
55
LINTER_VERSION_FILE=./bin/.golangci-lint-version-$(GOLANGCI_LINT_VERSION)

httphelpers/certificates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func MakeServerWithCert(certFilePath, keyFilePath string, handler http.Handler)
7878
server.TLS = &tls.Config{
7979
Certificates: []tls.Certificate{cert},
8080
}
81-
server.TLS.BuildNameToCertificate() //nolint:staticcheck // method is deprecated but we still need to support older Gos
81+
server.TLS.BuildNameToCertificate()
8282
server.StartTLS()
8383
return server, nil
8484
}

0 commit comments

Comments
 (0)