-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inputPath
set to some.bicepparam
file works, but throws warning has not been processed because no matching rules were found
#1831
Comments
Hi @o-l-a-v this is intended. The behaviour will change in PSRule v3, because it is a common cause for confusion. Expanding my explanation, by default, PSRule will warn objects that are processed and no rules have run. Each file is treated as an independent object in addition to the Azure resources contained within. Because you have no rules that check this object (PSRule for Azure doesn't ship with any) the warning is generated. You can toggle of the warning by setting the If there is no further issue, let's close this issue. |
Thanks for the explaination @BernieWhite. I wrongfully assumed PSRule analyzed the results of Bicep build. |
@o-l-a-v In part it does, but not by a rule. If Bicep generates a Error either via a linter rule that is set to error or a general compile issue PSRule will propagate the error up and generate an error, which will result in breaking the build. But there is no rule that drives this, so a warning would still be generated. |
Description of the issue
Setting
inputPath
tosome.bicepparam
file withPSRule.Rules.Azure
seems to work as expected, but it throws a warningTarget object 'some.bicepparam' has not been processed because no matching rules were found.
I do this because I want PSRule to only validate one environment in a repo; prod. So actual file name is
prod.bicepparam
. Ref:<env>.bicepparam
creates multiple issues for findings inmain.bicep
Azure/PSRule.Rules.Azure#2882Output from GitHub Action we're we do not exclude any rules:
To Reproduce
Steps to reproduce the issue:
Expected behaviour
Should not throw a warning?
Error output
No error.
Module in use and version:
ubuntu-latest
.Additional context
The text was updated successfully, but these errors were encountered: