Open
Description
Short description
The inspect
command does not detect undefined functions directly called in a rule, but it does detect them in a list comprehension.
Opa: 0.67.1
Steps To Reproduce
File:
package lib.test
import rego.v1
some_rule if {
res := [r |
some r in input
func()
]
}
some_rule if {
func()
}
$ tar -C bundle -czvf bundle.tar.gz .
$ opa inspect bundle.tar.gz
error: 1 error occurred: ./test.rego:8: rego_type_error: undefined function func
Expected behavior
All cases of using the undefined function will be detected