Skip to content

Commit ccb3c91

Browse files
committed
lint: allow ireturn for FSC metrics Gauge and Histogram
The ireturn allow list covers types matching (or|er)$ plus the prometheus and fabric-lib-go counter/gauge/histogram types. The recording provider in the metricsdoc reference test returns the fabric-smart-client equivalents, which match neither, so CI failed on NewGauge and NewHistogram. NewCounter passes only incidentally, on the suffix rule. Both signatures are fixed by the metrics.Provider interface that provider implements, which is the case the allow list already documents, so add the two types there rather than carry a nolint at each site. Signed-off-by: AkramBitar <akram@il.ibm.com>
1 parent 6a96c03 commit ccb3c91

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ linters:
106106
- go.opentelemetry.io/otel/trace.Span
107107
- github.com/hyperledger/fabric-lib-go/common/metrics.Gauge
108108
- github.com/hyperledger/fabric-lib-go/common/metrics.Histogram
109+
- github.com/hyperledger-labs/fabric-smart-client/platform/view/services/metrics.Gauge
110+
- github.com/hyperledger-labs/fabric-smart-client/platform/view/services/metrics.Histogram
109111
- github.com/hyperledger-labs/fabric-smart-client/platform/common/driver.ConfigService
110112
- github.com/hyperledger-labs/fabric-smart-client/integration/nwo/api.ViewClient
111113
- github.com/hyperledger-labs/fabric-smart-client/integration/nwo/api.Platform

0 commit comments

Comments
 (0)