Skip to content

Commit b5363da

Browse files
committed
fix: Exclude unparam for ledger package to avoid panic on generics
The unparam linter panics when analyzing code with Go generics that use type constraints (like UnitMarker with ~string). This is a known issue with golangci-lint's handling of generic types in Go 1.25. Excludes unparam for pkg/platform/ledger/ to allow the generic Quantity[U] type to be linted by other linters without causing CI failures.
1 parent 93938b2 commit b5363da

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ linters:
106106
- gocyclo
107107
- gocognit
108108

109+
# Exclude unparam for ledger package (unparam panics on Go generics with type constraints)
110+
# See: https://github.com/golangci/golangci-lint/issues/5254
111+
- path: pkg/platform/ledger/.*\.go
112+
linters:
113+
- unparam
114+
109115
# Exclude all linters for integration tests (require external services)
110116
- path: test/integration/
111117
linters:

0 commit comments

Comments
 (0)