forked from apps/featurer
Initial commit.
This commit is contained in:
71
.golangci.yml
Normal file
71
.golangci.yml
Normal file
@@ -0,0 +1,71 @@
|
||||
---
|
||||
run:
|
||||
timeout: 5m
|
||||
|
||||
linters:
|
||||
enable-all: true
|
||||
disable:
|
||||
# deprecated
|
||||
- varnamelen
|
||||
- testpackage
|
||||
- containedctx # very strange linter
|
||||
- gomnd
|
||||
- execinquery
|
||||
# meaningfully disabled
|
||||
- gochecknoglobals
|
||||
- exhaustruct
|
||||
- depguard # wtf is this linter
|
||||
- tparallel # duplicates paralleltest
|
||||
- unused # not very clever lint for generics
|
||||
- ireturn # not very clever lint for generics
|
||||
- interfacebloat # love big interfaces :)
|
||||
- gci # whines about imports too much.
|
||||
|
||||
linters-settings:
|
||||
cyclop:
|
||||
skip-tests: true
|
||||
max-complexity: 20
|
||||
package-average: 10
|
||||
forbidigo:
|
||||
forbid:
|
||||
- '^(fmt\.Print(|f|ln)|print|println)$'
|
||||
- '^time\.Now\(\)($|\.F|\.A|\.B|\.L|\.UTC\(\)\.I|,|\))(# Calls of time\.Now() without \.UTC() is prohibited\.)?'
|
||||
funlen:
|
||||
ignore-comments: true
|
||||
lines: 200
|
||||
statements: 60
|
||||
gocyclo:
|
||||
min-complexity: 20
|
||||
gofumpt:
|
||||
extra-rules: true
|
||||
govet:
|
||||
enable-all: true
|
||||
lll:
|
||||
line-length: 120
|
||||
nestif:
|
||||
min-complexity: 20
|
||||
tagliatelle:
|
||||
case:
|
||||
use-field-name: true
|
||||
rules:
|
||||
json: snake
|
||||
yaml: camel
|
||||
|
||||
issues:
|
||||
exclude-use-default: false
|
||||
exclude:
|
||||
- ST1000 # package comment
|
||||
- package-comments
|
||||
exclude-rules:
|
||||
- path: .+_test\.go
|
||||
linters:
|
||||
- gosec
|
||||
- linters:
|
||||
- godox
|
||||
text: "TODO"
|
||||
# Default error checking pattern "if err := ... ;err != nil {}" multiple times makes go vet to whine.
|
||||
- linters:
|
||||
- govet
|
||||
text: 'declaration of "err" shadows'
|
||||
max-issues-per-linter: 0
|
||||
max-same-issues: 0
|
||||
Reference in New Issue
Block a user