Skip to content

Commit

Permalink
Add faillint paths to reject global prometheus metrics (#18)
Browse files Browse the repository at this point in the history
* Add faillint paths to reject global prometheus metrics and MustRegister()

Signed-off-by: Tyler Reid <[email protected]>
  • Loading branch information
Tyler Reid authored Aug 27, 2021
1 parent 55a3c2e commit 918b9f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ lint: .tools/bin/misspell .tools/bin/faillint .tools/bin/golangci-lint
faillint -paths "github.com/bmizerany/assert=github.com/stretchr/testify/assert,\
golang.org/x/net/context=context,\
sync/atomic=go.uber.org/atomic,\
github.com/prometheus/client_golang/prometheus.{MultiError}=github.com/prometheus/prometheus/tsdb/errors.{NewMulti}" ./...
github.com/prometheus/client_golang/prometheus.{MustRegister}=github.com/prometheus/client_golang/prometheus/promauto,\
github.com/prometheus/client_golang/prometheus.{NewCounter,NewCounterVec,NewGauge,NewGaugeVec,NewGaugeFunc,NewHistogram,NewHistogramVec,NewSummary,NewSummaryVec}\
=github.com/prometheus/client_golang/prometheus/promauto.With.{NewCounter,NewCounterVec,NewGauge,NewGaugeVec,NewGaugeFunc,NewHistogram,NewHistogramVec,NewSummary,NewSummaryVec}"\
./...

.PHONY: clean
clean:
Expand Down

0 comments on commit 918b9f1

Please sign in to comment.