acbeb93f79
This wasn't needed before because the other code wasn't in the main module and golangci-lint won't cross a module boundary. Signed-off-by: Matt Moyer <moyerm@vmware.com>
75 lines
1.3 KiB
YAML
75 lines
1.3 KiB
YAML
# https://github.com/golangci/golangci-lint#config-file
|
|
run:
|
|
deadline: 1m
|
|
skip-dirs:
|
|
- generated
|
|
|
|
linters:
|
|
disable-all: true
|
|
enable:
|
|
# default linters
|
|
- deadcode
|
|
- errcheck
|
|
- gosimple
|
|
- govet
|
|
- ineffassign
|
|
- staticcheck
|
|
- structcheck
|
|
- typecheck
|
|
- unused
|
|
- varcheck
|
|
|
|
# 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
|
|
- golint
|
|
- goprintffuncname
|
|
- gosec
|
|
- misspell
|
|
- nakedret
|
|
- nestif
|
|
- noctx
|
|
- nolintlint
|
|
- prealloc
|
|
- rowserrcheck
|
|
- scopelint
|
|
- sqlclosecheck
|
|
- unconvert
|
|
- unparam
|
|
- 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
|