Debian Codegraph @

.golangci.yaml

raw symbols SCIP
1 ---
2 linters:
3 enable:
4 # check when errors are compared without errors.Is
5 - errorlint
6
7 # check imports order and makes it always deterministic.
8 - gci
9
10 # Very Basic spell error checker
11 - misspell
12
13 # Fast, configurable, extensible, flexible, and beautiful linter for Go.
14 # Drop-in replacement of golint.
15 - revive
16
17 # make sure to use t.Helper() when needed
18 - thelper
19
20 # ensure that lint exceptions have explanations. Consider the case below:
21 - nolintlint
22
23 # detect duplicated words in code
24 - dupword
25
26 # mirror suggests rewrites to avoid unnecessary []byte/string conversion
27 - mirror
28
29 # testify checks good usage of github.com/stretchr/testify.
30 - testifylint
31
32 linters-settings:
33 dupword:
34 # Keywords used to ignore detection.
35 # Default: []
36 ignore:
37 - "FAIL" # "FAIL FAIL" is tolerated
38
39 nolintlint:
40 # Disable to ensure that all nolint directives actually have an effect.
41 # Default: false
42 allow-unused: true # too many false positive reported
43 # Exclude following linters from requiring an explanation.
44 # Default: []
45 allow-no-explanation: []
46 # Enable to require an explanation of nonzero length
47 # after each nolint directive.
48 # Default: false
49 require-explanation: true
50 # Enable to require nolint directives to mention the specific
51 # linter being suppressed.
52 # Default: false
53 require-specific: true
54
55 revive:
56 rules:
57 - name: bare-return
58 - name: blank-imports
59 - name: comment-spacings
60 - name: context-as-argument
61 arguments:
62 - allowTypesBefore: "*testing.T"
63 - name: context-keys-type
64 - name: defer
65 arguments:
66 - ["call-chain", "loop"]
67 - name: dot-imports
68 - name: early-return
69 - name: empty-block
70 - name: error-return
71 - name: error-strings
72 - name: error-naming
73 - name: errorf
74 - name: exported
75 arguments:
76 # enables checking public methods of private types
77 - "checkPrivateReceivers"
78 # make error messages clearer
79 - "sayRepetitiveInsteadOfStutters"
80 - name: if-return
81 - name: import-shadowing
82 - name: increment-decrement
83 - name: indent-error-flow
84 - name: exported
85 - name: var-naming
86 - name: var-declaration
87 - name: package-comments
88 - name: range
89 - name: receiver-naming
90 - name: redefines-builtin-id
91 - name: superfluous-else
92 - name: time-naming
93 - name: time-equal
94 - name: unexported-return
95 - name: use-any
96 - name: unreachable-code
97 - name: unhandled-error
98 arguments:
99 - "fmt.Print.*"
100 - "fmt.Fprint.*"
101 - "bytes.Buffer.Write.*"
102 - "strings.Builder.Write.*"
103 - name: unused-parameter
104 - name: unused-receiver
105 - name: useless-break
106
107 # define the import orders
108 gci:
109 sections:
110 # Standard section: captures all standard packages.
111 - standard
112 # Default section: catchall that is not standard or custom
113 - default
114 # Custom section: groups all imports with the specified Prefix.
115 - prefix(github.com/mfridman)
116