passforios-gopenpgp/.golangci.yml

50 lines
2.6 KiB
YAML
Raw Permalink Normal View History

linters-settings:
godox:
keywords: # default keywords are TODO, BUG, and FIXME, but we override this by ignoring TODO
- BUG
- FIXME
funlen:
lines: 100
statements: 80
cyclop:
# the minimal code complexity to report
max-complexity: 20
2021-09-21 11:27:31 +02:00
gocognit:
min-complexity: 45
issues:
exclude-use-default: false
exclude:
- Using the variable on range scope `tt` in function literal
- GetJsonSHA256Fingerprints should be GetJSONSHA256Fingerprints
- ST1003 # CamelCase variables; see constants/cipher.go
linters:
enable-all: true
disable:
- dupl # Tool for code clone detection [fast: true, auto-fix: false]
- gochecknoglobals # Checks that no globals are present in Go code [fast: true, auto-fix: false]
- gochecknoinits # Checks that no init functions are present in Go code [fast: true, auto-fix: false]
- golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes [fast: true, auto-fix: false]
- goerr113 # Golang linter to check the errors handling expressions [fast: true, auto-fix: false]
- gomnd # An analyzer to detect magic numbers. [fast: true, auto-fix: false]
- lll # Reports long lines [fast: true, auto-fix: false]
- testpackage # Makes you use a separate _test package [fast: true, auto-fix: false]
- wsl # Whitespace Linter - Forces you to use empty lines! [fast: true, auto-fix: false]
- gofumpt # Enforce a stricter format than gofmt
2020-08-04 11:08:31 +02:00
- gci # Enforce blank lines check
- nlreturn # Enforce blank lines for return statements
- exhaustivestruct # Enforce structures to be fully filled on instantiation - terrible with openpgp configs
- paralleltest # Detects missing usage of t.Parallel() method in your Go test
- forbidigo # Static analysis tool to forbid use of particular identifiers
- thelper # Enforce test helper formatting
- revive # Force CamelCase instead of all caps
- nilerr # Force return err when not nil
- wrapcheck # Force wrapping of external error TODO: when the bug is fixed update the linter
2021-11-11 16:42:12 +01:00
- gomoddirectives # Prohibits the use of replace statements
- varnamelen # Forbids short var names
2022-02-15 11:14:55 +01:00
- ireturn # Prevents returning interfaces
2022-05-17 15:55:27 +02:00
- forcetypeassert # Forces to assert types in tests
- nonamedreturns # Disallows named returns
- exhaustruct # Forces all structs to be named
- nosnakecase # Disallows snake case