-
Notifications
You must be signed in to change notification settings - Fork 53
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
Piped input does not respect excluded paths #1114
Comments
@bengeset96 Thanks for reporting the issue. Yes, You could do this via That said I can see why you would want to do this, and the support within PSRule makes it a desirable option. Although it could be confusing to have it enabled by default. |
Thanks for the great explanation, it all makes sense now! In this particular case, PSRule is used for validation on PR in Bicep module repo. Each module folder has Then it seems like it should be like this based on your explanation?
|
@bengeset96 Yes, that would be correct as a workaround. |
Thank you, awesome stuff! I'm sucessfully using
Looking forward to official release when it arrives. |
@bengeset96 No worries. The release notes may not be clear. I'll update that. You can try the pre-release by setting the Input.IgnoreObjectSource option to |
I am. Checked your PR.
With Does not work. I think it's because of -AllowPrerelease is not working the way I have configured it. Have not tested with the ADO task which has this input available.
|
@bengeset96 Generally, PSRule doesn't care about additional keys. So adding Without seeing your full config i'd assume that you have a |
It was all on me, you were absolutely correct. Seems like it's a bit tricky to use pre-release version. Tried to use these modules, but still it's using 2.1.0.
https://microsoft.github.io/PSRule/v2/install-instructions/#pre-release-versions Is there another way to force the usage of pre-release version as you know of? Also added
|
@bengeset96 Currently To install a pre-release version of the PSRule engine just install PSRule directly, instead of relying on the dependency chain from PSRule for Azure. Try: Install-Module -Name PowerShellGet -Repository PSGallery -Scope CurrentUser -Force;
Install-Module PSRule -AllowPrerelease -Scope CurrentUser -Force;
Install-Module PSRule.Rules.Azure -AllowPrerelease -Scope CurrentUser -Force; |
@BernieWhite I am aware, I do really like the Then I understand, so you actually have to install it directly, I taught it would work with the dependency chain. With your suggestion it works perfectly fine and once again you have made a superb contribution that I am truly grateful for! |
@bengeset96 No worries. And thanks for the feedback. |
Description of the issue
PSRule does not respect exluded paths in
ps-rule.yaml
To Reproduce
I also have checked ps-rule branch in ALZ-Bicep and I can see it's solved the same way there?
Also tried
- "!/modules/**/*.test.bicep"
The task
Expected behaviour
Should only traverse test folder with it's underlaying .bicep content.
Error output
As seen it's also trying to traverse thru main.bicep which is not buildable.
Module in use and version:
I am quite unsure if this is a bug or just human error from my side.
The text was updated successfully, but these errors were encountered: