.golangci.yml raw
1 version: "2"
2
3 formatters:
4 enable:
5 - gci
6 - gofumpt
7 settings:
8 gofumpt:
9 extra-rules: true
10
11 linters:
12 default: all
13 disable:
14 - cyclop # duplicate of gocyclo
15 - dupl
16 - err113
17 - exhaustive
18 - exhaustruct
19 - forcetypeassert
20 - lll
21 - mnd
22 - nilnil
23 - nlreturn
24 - noinlineerr
25 - paralleltest
26 - prealloc
27 - rowserrcheck # not relevant (SQL)
28 - sqlclosecheck # not relevant (SQL)
29 - testpackage
30 - tparallel
31 - varnamelen
32 - wrapcheck
33 - wsl # deprecated
34
35 settings:
36 depguard:
37 rules:
38 main:
39 deny:
40 - pkg: github.com/instana/testify
41 desc: not allowed
42 - pkg: github.com/pkg/errors
43 desc: Should be replaced by standard lib errors package
44 funlen:
45 lines: -1
46 statements: 40
47 goconst:
48 min-len: 5
49 min-occurrences: 3
50 gocritic:
51 disabled-checks:
52 - sloppyReassign
53 - rangeValCopy
54 - octalLiteral
55 - paramTypeCombine
56 enabled-tags:
57 - diagnostic
58 - style
59 - performance
60 settings:
61 hugeParam:
62 sizeThreshold: 120
63 gocyclo:
64 min-complexity: 15
65 godox:
66 keywords:
67 - FIXME
68 govet:
69 disable:
70 - fieldalignment
71 enable-all: true
72 misspell:
73 locale: US
74 tagliatelle:
75 case:
76 rules:
77 json: snake
78 perfsprint:
79 err-error: true
80 errorf: true
81 sprintf1: true
82 strconcat: false
83
84 exclusions:
85 warn-unused: true
86 presets:
87 - comments
88 rules:
89 - linters:
90 - funlen
91 - gosec
92 path: .*_test.go
93 - linters:
94 - unparam
95 path: mailinabox_test.go
96 text: 'testHandler - statusCode always receives http.StatusOK \(200\)'
97
98 issues:
99 max-issues-per-linter: 0
100 max-same-issues: 0
101