If I do something like this:
conftest test --combine --parser hcl2 --ignore '.*/provider.tf' deployments/**/*.tf
I would expect that the ignore regex is evaluated for all of the files that are evaluated. Instead, only directories that conftest walks itself are evaluated for ignore via the regex: https://github.com/open-policy-agent/conftest/blob/master/runner/test.go#L133-L143
This affects usage whether the regex is provided on the command line or in the configuration file. The fix would just be to evaluate the regex match before adding the file to the files slice (currently on line 141 above).
If I do something like this:
I would expect that the ignore regex is evaluated for all of the files that are evaluated. Instead, only directories that conftest walks itself are evaluated for ignore via the regex: https://github.com/open-policy-agent/conftest/blob/master/runner/test.go#L133-L143
This affects usage whether the regex is provided on the command line or in the configuration file. The fix would just be to evaluate the regex match before adding the file to the files slice (currently on line 141 above).