-
Notifications
You must be signed in to change notification settings - Fork 46
/
0022_ignore_multi.txt
37 lines (31 loc) · 1.02 KB
/
0022_ignore_multi.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
pint.ok --no-color lint rules
! stdout .
cmp stderr stderr.txt
-- stderr.txt --
level=info msg="Loading configuration file" path=.pint.hcl
level=info msg="File parsed" path=rules/1.yaml rules=3
rules/1.yaml:2: dropped label should be removed when aggregating "^.+$" rules, remove dropped from by() (promql/aggregate)
expr: sum(errors_total) by(keep,dropped)
rules/1.yaml:5: keep label is required and should be preserved when aggregating "^.+$" rules, remove keep from without() (promql/aggregate)
expr: sum(errors_total) without(keep,dropped)
level=info msg="Problems found" Warning=2
-- rules/1.yaml --
- record: disabled
expr: sum(errors_total) by(keep,dropped)
- record: B
expr: sum(errors_total) without(keep,dropped)
- record: C
# pint disable promql/aggregate(keep:true)
# pint disable promql/aggregate(dropped:false)
expr: sum(sum(errors_total) without(keep)) by(dropped)
-- .pint.hcl --
rule {
aggregate ".+" {
keep = [ "keep" ]
}
}
rule {
aggregate ".+" {
strip = [ "dropped" ]
}
}