@@ -15,7 +15,13 @@ test_fail_non_raw_rule_head if {
15
15
" category" : " idiomatic" ,
16
16
" description" : " Use raw strings for regex patterns" ,
17
17
" level" : " error" ,
18
- " location" : {" col" : 18 , " file" : " policy.rego" , " row" : 3 , " text" : " x := regex.match(\" [0-9]+\" , \" 1\" )" },
18
+ " location" : {
19
+ " col" : 18 ,
20
+ " file" : " policy.rego" ,
21
+ " row" : 3 ,
22
+ " text" : " x := regex.match(\" [0-9]+\" , \" 1\" )" ,
23
+ " end" : {" col" : 26 , " row" : 3 },
24
+ },
19
25
" related_resources" : [{
20
26
" description" : " documentation" ,
21
27
" ref" : config.docs.resolve_url (" $baseUrl/$category/non-raw-regex-pattern" , " idiomatic" ),
@@ -33,7 +39,13 @@ test_fail_non_raw_rule_body if {
33
39
" category" : " idiomatic" ,
34
40
" description" : " Use raw strings for regex patterns" ,
35
41
" level" : " error" ,
36
- " location" : {" col" : 18 , " file" : " policy.rego" , " row" : 4 , " text" : " \t\t regex.is_valid(\" [0-9]+\" )" },
42
+ " location" : {
43
+ " col" : 18 ,
44
+ " file" : " policy.rego" ,
45
+ " row" : 4 ,
46
+ " text" : " \t\t regex.is_valid(\" [0-9]+\" )" ,
47
+ " end" : {" col" : 26 , " row" : 4 },
48
+ },
37
49
" related_resources" : [{
38
50
" description" : " documentation" ,
39
51
" ref" : config.docs.resolve_url (" $baseUrl/$category/non-raw-regex-pattern" , " idiomatic" ),
@@ -49,7 +61,13 @@ test_fail_pattern_in_second_arg if {
49
61
" category" : " idiomatic" ,
50
62
" description" : " Use raw strings for regex patterns" ,
51
63
" level" : " error" ,
52
- " location" : {" col" : 25 , " file" : " policy.rego" , " row" : 3 , " text" : " r := regex.replace(\" a\" , \" [a]\" , \" b\" )" },
64
+ " location" : {
65
+ " col" : 25 ,
66
+ " file" : " policy.rego" ,
67
+ " row" : 3 ,
68
+ " text" : " r := regex.replace(\" a\" , \" [a]\" , \" b\" )" ,
69
+ " end" : {" col" : 30 , " row" : 3 },
70
+ },
53
71
" related_resources" : [{
54
72
" description" : " documentation" ,
55
73
" ref" : config.docs.resolve_url (" $baseUrl/$category/non-raw-regex-pattern" , " idiomatic" ),
0 commit comments