You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/testdata/promlinter.go
+4-4
Original file line number
Diff line number
Diff line change
@@ -8,26 +8,26 @@ import (
8
8
9
9
var (
10
10
_=promauto.NewCounterVec(
11
-
prometheus.CounterOpts{ // Metric: test_metric_name Error: counter metrics should have "_total" suffix
11
+
prometheus.CounterOpts{ // ERROR `Metric: test_metric_name Error: counter metrics should have "_total" suffix`
12
12
Name: "test_metric_name",
13
13
Help: "test help text",
14
14
}, []string{},
15
15
)
16
16
17
17
_=promauto.NewCounterVec(
18
-
prometheus.CounterOpts{ // Metric: test_metric_total Error: no help text
18
+
prometheus.CounterOpts{ // ERROR "Metric: test_metric_total Error: no help text"
19
19
Name: "test_metric_total",
20
20
}, []string{},
21
21
)
22
22
23
23
_=promauto.NewCounterVec(
24
-
prometheus.CounterOpts{ // Metric: metric_type_in_name_counter_total Error: metric name should not include type 'counter'
24
+
prometheus.CounterOpts{ // ERROR `Metric: metric_type_in_name_counter_total Error: metric name should not include type 'counter'`
25
25
Name: "metric_type_in_name_counter_total",
26
26
Help: "foo",
27
27
}, []string{},
28
28
)
29
29
30
-
_=prometheus.NewHistogram(prometheus.HistogramOpts{ // Metric: test_duration_milliseconds Error: use base unit "seconds" instead of "milliseconds"
30
+
_=prometheus.NewHistogram(prometheus.HistogramOpts{ // ERROR `Metric: test_duration_milliseconds Error: use base unit "seconds" instead of "milliseconds"`
0 commit comments