-
Notifications
You must be signed in to change notification settings - Fork 452
Expand file tree
/
Copy path.golangci.yaml
More file actions
33 lines (32 loc) · 872 Bytes
/
Copy path.golangci.yaml
File metadata and controls
33 lines (32 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
version: "2"
run:
concurrency: 16
timeout: 10m
go: "1.26"
relative-path-mode: gomod
allow-parallel-runners: true
linters:
enable:
- depguard
- sloglint
settings:
depguard:
rules:
no-direct-otelhttp:
# Forbid importing otelhttp directly in tool files.
# All HTTP clients should use mcpgrafana.BuildTransport() which
# handles OTel tracing (plus auth, org-ID, user-agent) centrally.
list-mode: lax
files:
- "**/tools/*.go"
- "!**/*_test.go"
deny:
- pkg: "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
desc: "Use mcpgrafana.BuildTransport() instead of wrapping with otelhttp directly."
sloglint:
no-global: "all"
exclusions:
rules:
- linters:
- sloglint
path: "cmd/"