c6c2c525a6
Also fix some tests that were broken by bumping golang and dependencies in the previous commits. Note that in addition to changes made to satisfy the linter which do not impact the behavior of the code, this commit also adds ReadHeaderTimeout to all usages of http.Server to satisfy the linter (and because it seemed like a good suggestion).
71 lines
1.2 KiB
YAML
71 lines
1.2 KiB
YAML
# https://github.com/golangci/golangci-lint#config-file
|
|
run:
|
|
deadline: 1m
|
|
skip-dirs:
|
|
- generated
|
|
|
|
linters:
|
|
disable-all: true
|
|
enable:
|
|
# default linters
|
|
- errcheck
|
|
- gosimple
|
|
- govet
|
|
- ineffassign
|
|
- staticcheck
|
|
- typecheck
|
|
- unused
|
|
|
|
# additional linters for this project (we should disable these if they get annoying).
|
|
- asciicheck
|
|
- bodyclose
|
|
- depguard
|
|
- dogsled
|
|
- exhaustive
|
|
- exportloopref
|
|
- funlen
|
|
- gochecknoglobals
|
|
- gochecknoinits
|
|
- gocritic
|
|
- gocyclo
|
|
- godot
|
|
- goheader
|
|
- goimports
|
|
- revive
|
|
- goprintffuncname
|
|
- gosec
|
|
- misspell
|
|
- nakedret
|
|
- nestif
|
|
- noctx
|
|
- nolintlint
|
|
- prealloc
|
|
- rowserrcheck
|
|
- exportloopref
|
|
- sqlclosecheck
|
|
- unconvert
|
|
- whitespace
|
|
|
|
issues:
|
|
exclude-rules:
|
|
# exclude tests from some rules for things that are useful in a testing context.
|
|
- path: _test\.go
|
|
linters:
|
|
- funlen
|
|
- gochecknoglobals
|
|
|
|
linters-settings:
|
|
funlen:
|
|
lines: 150
|
|
statements: 50
|
|
goheader:
|
|
values:
|
|
regexp:
|
|
# YYYY or YYYY-YYYY
|
|
YEARS: \d\d\d\d(-\d\d\d\d)?
|
|
template: |-
|
|
Copyright {{YEARS}} the Pinniped contributors. All Rights Reserved.
|
|
SPDX-License-Identifier: Apache-2.0
|
|
goimports:
|
|
local-prefixes: go.pinniped.dev
|