some refinement
Build and Publish / Metadata (push) Has been cancelled
Build and Publish / BuildAndDeployAmd64 (push) Has been cancelled

This commit is contained in:
2026-04-07 12:44:55 +02:00
parent 89e1db8edf
commit 0ed1cb4355
14 changed files with 390 additions and 104 deletions
+27
View File
@@ -0,0 +1,27 @@
rules:
- id: go-otel-span-end-defer
message: "Potential missing `defer span.End()`. Spans should be closed to avoid memory leaks."
languages: [go]
severity: WARNING
patterns:
- pattern: |
$SPAN, $ERR := $TRACER.Start(...)
...
- pattern-not: |
$SPAN, $ERR := $TRACER.Start(...)
defer $SPAN.End()
...
- pattern-not: |
$SPAN, $ERR := $TRACER.Start(...)
...
$SPAN.End()
- id: no-direct-log-fatal
message: "Avoid using `log.Fatal` in internal packages. Use errors to propagate up to main."
languages: [go]
severity: ERROR
pattern: log.Fatal(...)
paths:
exclude:
- "main.go"
- "cmd/**"