1# SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
2#
3# SPDX-License-Identifier: CC0-1.0
4
5version: "2"
6linters:
7 default: none
8 # Be specific
9 enable:
10 - arangolint
11 - asasalint
12 - asciicheck
13 - bidichk
14 - bodyclose
15 - canonicalheader
16 - containedctx
17 - contextcheck
18 - copyloopvar
19 - cyclop
20 - decorder
21 - dogsled
22 - dupl
23 - dupword
24 - durationcheck
25 - embeddedstructfieldcheck
26 - err113
27 - errcheck
28 - errchkjson
29 - errname
30 - errorlint
31 - exhaustive
32 - exhaustruct
33 - exptostd
34 - fatcontext
35 - forbidigo
36 - forcetypeassert
37 - funcorder
38 - funlen
39 - ginkgolinter
40 - gocheckcompilerdirectives
41 - gochecknoglobals
42 - gochecknoinits
43 - gochecksumtype
44 - gocognit
45 - goconst
46 - gocritic
47 - gocyclo
48 - godoclint
49 - godot
50 - godox
51 - goheader
52 - gomoddirectives
53 - gomodguard
54 - goprintffuncname
55 - gosec
56 - gosmopolitan
57 - govet
58 - grouper
59 - iface
60 - importas
61 - inamedparam
62 - ineffassign
63 - interfacebloat
64 - intrange
65 - iotamixing
66 - lll
67 - loggercheck
68 - maintidx
69 - makezero
70 - mirror
71 - misspell
72 - mnd
73 - musttag
74 - nakedret
75 - nestif
76 - nilerr
77 - nilnesserr
78 - nilnil
79 - nlreturn
80 - noctx
81 - nolintlint
82 - nonamedreturns
83 - nosprintfhostport
84 - paralleltest
85 - perfsprint
86 - prealloc
87 - predeclared
88 - promlinter
89 - protogetter
90 - reassign
91 - recvcheck
92 - revive
93 - rowserrcheck
94 - sloglint
95 - spancheck
96 - sqlclosecheck
97 - staticcheck
98 - tagalign
99 - tagliatelle
100 - testableexamples
101 - testifylint
102 - testpackage
103 - thelper
104 - tparallel
105 - unconvert
106 - unparam
107 - unqueryvet
108 - unused
109 - usestdlibvars
110 - usetesting
111 - varnamelen
112 - wastedassign
113 - whitespace
114 - wrapcheck
115 - wsl_v5
116 - zerologlint
117 - prealloc
118
119 disable:
120 - depguard
121 - ireturn
122
123 settings:
124 exhaustruct:
125 exclude:
126 # External types where zero values are intentional by library design
127 - github.com/modelcontextprotocol/go-sdk/mcp.Implementation
128 - github.com/modelcontextprotocol/go-sdk/mcp.Tool
129 - github.com/modelcontextprotocol/go-sdk/mcp.Resource
130 - github.com/modelcontextprotocol/go-sdk/mcp.ReadResourceResult
131 - github.com/modelcontextprotocol/go-sdk/mcp.ResourceContents
132 - github.com/modelcontextprotocol/go-sdk/mcp.CallToolResult
133 - github.com/modelcontextprotocol/go-sdk/mcp.TextContent
134 - git.secluded.site/go-lunatask.CreateTaskRequest
135 - git.secluded.site/go-lunatask.UpdateTaskRequest
136 # Internal output types where some fields are optional
137 - git.secluded.site/lunatask-mcp-server/tools/tasks.CreateOutput
138 - git.secluded.site/lunatask-mcp-server/tools/tasks.UpdateOutput
139 - git.secluded.site/lunatask-mcp-server/tools/tasks.DeleteOutput
140 - git.secluded.site/lunatask-mcp-server/tools/habits.TrackOutput
141 - git.secluded.site/lunatask-mcp-server/tools/timestamp.Output
142 tagliatelle:
143 case:
144 rules:
145 json: snake
146 varnamelen:
147 ignore-names:
148 - c # client
149 - f # file handle
150 - id # entity ID
151 - ok # boolean check
152 - db # database
153 - tx # transaction
154 - fn # function
155
156 exclusions:
157 rules:
158 - path: cmd/
159 linters:
160 - gochecknoglobals # Cobra commands are package-level vars
161 - gochecknoinits # Cobra uses init() for flag registration
162 - wrapcheck # CLI returns errors for display, wrapping adds noise
163 - mnd # Magic numbers in cobra.ExactArgs are clear in context
164 - dupl # Builder types differ but share method signatures
165 - path: cmd/
166 text: unused-parameter # Cobra callback signatures can't be changed
167 - path: tools/
168 linters:
169 - err113 # Handler validation errors are descriptive by nature
170 - cyclop # Apply options funcs have many branches but simple logic
171 - wrapcheck # Returning errors to MCP doesn't need wrapping
172 - path: internal/config/
173 text: "0o700" # Config directory permissions are intentional