mirror of
https://github.com/xlionjuan/wastebin-mcp-go.git
synced 2026-11-16 19:40:06 +00:00
* chore(deps): update dependency go to v1.27.1 * Fixed lints; `just verify` passes. Co-authored-by: xlionjuan <[email protected]> * Re-enabled exhaustruct_v5; just verify passes. Co-authored-by: xlionjuan <[email protected]> * Fixed lint config; verify passes. Co-authored-by: xlionjuan <[email protected]> * Explicit DisableBuiltinBlocklist; verify passes 0 issues. Co-authored-by: xlionjuan <[email protected]> --------- Co-authored-by: xlion-bot-renovate[bot] <218815870+xlion-bot-renovate[bot]@users.noreply.github.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: xlionjuan <[email protected]>
163 lines
3.7 KiB
YAML
163 lines
3.7 KiB
YAML
version: "2"
|
|
run:
|
|
modules-download-mode: readonly
|
|
tests: true
|
|
linters:
|
|
default: all
|
|
enable:
|
|
- fatcontext
|
|
- gomodguard_v2
|
|
- nosprintfhostport
|
|
- perfsprint
|
|
- sloglint
|
|
- thelper
|
|
- usetesting
|
|
- wastedassign
|
|
- wsl_v5
|
|
disable:
|
|
- exhaustruct
|
|
- gochecknoglobals
|
|
- gomodguard
|
|
- wrapcheck
|
|
- wsl
|
|
settings:
|
|
cyclop:
|
|
max-complexity: 15
|
|
exhaustruct_v5:
|
|
# These types are intentionally initialized partially: builders that
|
|
# fill optional fields conditionally, config/default constructors, and
|
|
# external SDK/stdlib types where only the needed fields are set.
|
|
optional-patterns:
|
|
- 'github\.com/modelcontextprotocol/go-sdk/mcp\.(Tool|ToolAnnotations|Implementation|IOTransport|CallToolResult|TextContent)$'
|
|
- 'net/http\.(Client|Transport)$'
|
|
- 'net\.Dialer$'
|
|
- 'wastebin-mcp-go\.CLIFlags$'
|
|
- 'wastebin-mcp-go/internal/wastebin\.(CreatePasteArgs|PasteResponse|wastebinRequest|BlocklistStages)$'
|
|
depguard:
|
|
rules:
|
|
main:
|
|
list-mode: lax
|
|
files:
|
|
- main.go
|
|
- cli.go
|
|
- mcp.go
|
|
allow:
|
|
- $gostd
|
|
- github.com/modelcontextprotocol/go-sdk/mcp
|
|
- wastebin-mcp-go/internal/wastebin
|
|
deny:
|
|
- pkg: net/http
|
|
desc: Use internal client wrapper instead
|
|
dupl:
|
|
threshold: 100
|
|
errcheck:
|
|
check-type-assertions: true
|
|
check-blank: true
|
|
errorlint:
|
|
asserts: true
|
|
comparison: true
|
|
gocognit:
|
|
min-complexity: 20
|
|
goconst:
|
|
min-len: 2
|
|
min-occurrences: 2
|
|
gocritic:
|
|
enabled-checks:
|
|
- deferInLoop
|
|
- httpNoBody
|
|
- unnecessaryDefer
|
|
gocyclo:
|
|
min-complexity: 13
|
|
govet:
|
|
enable:
|
|
- shadow
|
|
interfacebloat:
|
|
max: 5
|
|
lll:
|
|
line-length: 120
|
|
misspell:
|
|
locale: US
|
|
nakedret:
|
|
max-func-lines: 1
|
|
nolintlint:
|
|
require-explanation: true
|
|
require-specific: true
|
|
funlen:
|
|
lines: 60
|
|
statements: 40
|
|
prealloc:
|
|
simple: true
|
|
range-loops: true
|
|
sloglint:
|
|
no-mixed-args: true
|
|
kv-only: true
|
|
varnamelen:
|
|
min-name-length: 2
|
|
exclusions:
|
|
generated: lax
|
|
paths:
|
|
- .*\.pb\.go$
|
|
- third_party$
|
|
- builtin$
|
|
- examples$
|
|
rules:
|
|
- linters: [exhaustruct_v5]
|
|
path: ".*_test\\.go$"
|
|
text: ".*"
|
|
- linters: [forbidigo]
|
|
path: "cli\\.go$"
|
|
text: ".*"
|
|
- linters: [funlen]
|
|
path: ".*_test\\.go$"
|
|
text: ".*"
|
|
- linters: [dupl]
|
|
path: ".*_test\\.go$"
|
|
text: ".*"
|
|
- linters: [gosmopolitan]
|
|
path: ".*_test\\.go$"
|
|
text: ".*"
|
|
- linters: [goconst]
|
|
path: ".*_test\\.go$"
|
|
text: ".*"
|
|
- linters: [varnamelen]
|
|
path: ".*_test\\.go$"
|
|
text: ".*"
|
|
- linters: [gocognit]
|
|
path: ".*_test\\.go$"
|
|
text: ".*"
|
|
- linters: [gocyclo]
|
|
path: ".*_test\\.go$"
|
|
text: ".*"
|
|
- linters: [cyclop]
|
|
path: ".*_test\\.go$"
|
|
text: ".*"
|
|
- linters: [tagliatelle]
|
|
path: 'internal/wastebin/types\.go$'
|
|
text: '.*'
|
|
issues:
|
|
max-issues-per-linter: 0
|
|
max-same-issues: 0
|
|
formatters:
|
|
enable:
|
|
- gci
|
|
- gofmt
|
|
- gofumpt
|
|
settings:
|
|
gci:
|
|
sections:
|
|
- standard
|
|
- default
|
|
- prefix(wastebin-mcp-go)
|
|
gofumpt:
|
|
extra:
|
|
group-params: true
|
|
clothe-returns: true
|
|
balance-calls: true
|
|
module-path: wastebin-mcp-go
|
|
exclusions:
|
|
generated: lax
|
|
paths:
|
|
- .*\.pb\.go$
|
|
- third_party$
|
|
- builtin$
|
|
- examples$
|