@@ -6,37 +6,37 @@ package before_resolution
6
6
7
7
# Helper to create attribute registry violations.
8
8
attr_registry_violation (violation_id, group_id, attr_id) = violation {
9
- violation := {
10
- " id" : violation_id,
11
- " type" : " semantic_convention_policies" ,
12
- " category" : " attribute_registry_checks" ,
13
- " group" : group_id,
14
- " attr" : attr_id,
15
- }
9
+ violation := {
10
+ " id" : violation_id,
11
+ " type" : " semantic_convention_policies" ,
12
+ " category" : " attribute_registry_checks" ,
13
+ " group" : group_id,
14
+ " attr" : attr_id,
15
+ }
16
16
}
17
17
18
18
# We only allow attribute groups in the attribute registry.
19
19
deny[attr_registry_violation (" attribute_registry_can_only_contain_attribute_groups" , group.id, " " )] {
20
- group := input.groups[_]
21
- startswith (group.id, " registry." )
22
- group.type != " attribute_group"
20
+ group := input.groups[_]
21
+ startswith (group.id, " registry." )
22
+ group.type != " attribute_group"
23
23
}
24
24
25
25
# Any group that is NOT in the attribute registry that has an attribute id is
26
26
# in violation of not using the attribute registry.
27
27
deny[attr_registry_violation (" attributes_must_be_defined_in_attribute_registry" , group.id, attr.id)] {
28
- group := input.groups[_]
29
- not startswith (group.id, " registry." )
30
- attr := group.attributes[_]
31
- attr.id != null
28
+ group := input.groups[_]
29
+ not startswith (group.id, " registry." )
30
+ attr := group.attributes[_]
31
+ attr.id != null
32
32
}
33
33
34
34
# A registry `attribute_group` containing at least one `ref` attribute is
35
35
# considered invalid if it's not in the registry group.
36
36
deny[attr_registry_violation (" attributes_in_registry_cannot_reference_each_other" , group.id, attr.ref)] {
37
- # TODO - this will need to be updated to support `embed` in the future.
38
- group := input.groups[_]
39
- startswith (group.id, " registry." )
40
- attr := group.attributes[_]
41
- attr.ref != null
37
+ # TODO - this will need to be updated to support `embed` in the future.
38
+ group := input.groups[_]
39
+ startswith (group.id, " registry." )
40
+ attr := group.attributes[_]
41
+ attr.ref != null
42
42
}
0 commit comments