68 lines
1.8 KiB
YAML
68 lines
1.8 KiB
YAML
version: 2
|
|
|
|
run:
|
|
timeout: 5m
|
|
|
|
linters-settings:
|
|
# Even in Rust you can get away with partial matching,
|
|
# so make sure that the linter respects the programmer's
|
|
# intent expressed in the form of "default" case.
|
|
exhaustive:
|
|
default-signifies-exhaustive: true
|
|
|
|
gosec:
|
|
excludes:
|
|
- G115
|
|
|
|
linters:
|
|
enable-all: true
|
|
|
|
disable:
|
|
# We don't have high-performance requirements at this moment, so sacrificing
|
|
# the code readability for marginal performance gains is not worth it.
|
|
- prealloc
|
|
|
|
# New linters that require a lot of codebase churn and noise, but perhaps we can enable them in the future.
|
|
- nlreturn
|
|
- wrapcheck
|
|
- errorlint
|
|
|
|
# Unfortunately, we use globals due to how spf13/cobra works.
|
|
- gochecknoglobals
|
|
|
|
# Style linters that are total nuts.
|
|
- wsl
|
|
- funlen
|
|
|
|
# Enough parallelism for now.
|
|
- paralleltest
|
|
|
|
# Ill-based assumptions about identifiers like fmt.Println without taking context into account.
|
|
- forbidigo
|
|
|
|
# Advantages of using t.Helper() are too small to waste developer's cognitive stamina on it.
|
|
- thelper
|
|
|
|
# Too restrictive defaults, plus there's already a gocyclo linter in place.
|
|
- cyclop
|
|
|
|
# Gives false positives for textbook examples[1][2]
|
|
# [1]: https://github.com/charithe/durationcheck/issues/7
|
|
# [2]: https://golang.org/pkg/time/ (see "To convert an integer number of units to a Duration, multiply:")
|
|
- durationcheck
|
|
|
|
# No way to disable the "exported" check for the whole project[1]
|
|
# [1]: https://github.com/mgechev/revive/issues/244#issuecomment-560512162
|
|
- revive
|
|
|
|
# Needs package whitelists
|
|
- depguard
|
|
|
|
# Not all errors need to be checked
|
|
- errcheck
|
|
|
|
issues:
|
|
# Don't hide multiple issues that belong to one class since GitHub annotations can handle them all nicely.
|
|
max-issues-per-linter: 0
|
|
max-same-issues: 0
|