Short description
Since version opa 1.1.0, I think after #7281, location information in annotations is missing.
Steps To Reproduce
mymodule.rego
package terraform
# METADATA
# description: My description
# authors:
# - "myself"
error_my_rule contains msg if {
msg = `firing`
}
opa v1.0.1
$ opa inspect -a ./mymodule.rego --format=json
{
"signatures_config": {},
"namespaces": {
"data.terraform": [
"mymodule.rego"
]
},
"annotations": [
{
"annotations": {
"authors": [
{
"name": "myself"
}
],
"description": "My description",
"scope": "rule"
},
"location": {
"file": "./mymodule.rego",
"row": 8,
"col": 1
},
"path": [
{
"type": "var",
"value": "data"
},
{
"type": "string",
"value": "terraform"
},
{
"type": "string",
"value": "error_my_rule"
}
]
}
],
"capabilities": {
"builtins": [
{
"name": "eq",
"decl": {
"args": [
{
"type": "any"
},
{
"type": "any"
}
],
"result": {
"type": "boolean"
},
"type": "function"
},
"infix": "="
}
],
"features": [
"rego_v1"
]
}
}
opa v1.1.0
$ opa inspect -a ./mymodule.rego --format=json
{
"signatures_config": {},
"namespaces": {
"data.terraform": [
"mymodule.rego"
]
},
"annotations": [
{
"annotations": {
"authors": [
{
"name": "myself"
}
],
"description": "My description",
"scope": "rule"
},
"path": [
{
"type": "var",
"value": "data"
},
{
"type": "string",
"value": "terraform"
},
{
"type": "string",
"value": "error_my_rule"
}
]
}
],
"capabilities": {
"builtins": [
{
"name": "eq",
"decl": {
"args": [
{
"type": "any"
},
{
"type": "any"
}
],
"result": {
"type": "boolean"
},
"type": "function"
},
"infix": "="
}
],
"features": [
"rego_v1"
]
}
}
Expected behavior
Expect to see location information
Additional context
Short description
Since version opa 1.1.0, I think after #7281, location information in annotations is missing.
Steps To Reproduce
mymodule.rego
opa v1.0.1
$ opa inspect -a ./mymodule.rego --format=jsonopa v1.1.0
$ opa inspect -a ./mymodule.rego --format=jsonExpected behavior
Expect to see location information
Additional context