Maint: add more linters to golangci-lint

This commit is contained in:
Quentin McGaw (desktop)
2021-09-14 19:26:46 +00:00
parent f7e4331e93
commit dc6171185e
2 changed files with 14 additions and 1 deletions

View File

@@ -32,14 +32,20 @@ issues:
linters:
disable-all: true
enable:
# - cyclop
# - errorlint
# - wrapcheck
- asciicheck
- bodyclose
- deadcode
- dogsled
- dupl
- durationcheck
- errcheck
- errname
- exhaustive
- exportloopref
- forcetypeassert
- gci
- gochecknoglobals
- gochecknoinits
@@ -52,13 +58,16 @@ linters:
- goheader
- goimports
- gomnd
- gomoddirectives
- goprintffuncname
- gosec
- gosimple
- govet
- importas
- importas
- ineffassign
- lll
- makezero
- misspell
- nakedret
- nestif
@@ -67,6 +76,8 @@ linters:
- nolintlint
- prealloc
- predeclared
- predeclared
- promlinter
- revive
- rowserrcheck
- sqlclosecheck
@@ -79,6 +90,7 @@ linters:
- unparam
- unused
- varcheck
- wastedassign
- whitespace
run:

View File

@@ -40,7 +40,8 @@ func Test_newHTTPClient(t *testing.T) {
require.NoError(t, err)
// Verify pia transport TLS config is set
piaTransport := piaClient.Transport.(*http.Transport)
piaTransport, ok := piaClient.Transport.(*http.Transport)
require.True(t, ok)
rootCAsSubjects := piaTransport.TLSClientConfig.RootCAs.Subjects()
assert.Equal(t, expectedRootCAsSubjects, rootCAsSubjects)
piaTransport.TLSClientConfig.RootCAs = nil