-
Notifications
You must be signed in to change notification settings - Fork 180
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
Add support to negated paths definition in the variable containing paths to ignore on policies updates #642
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for opal-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @disaverio - looks great! and cool addition.
To be clear - a "path to not ignore" (e.g !somefolder
) would always take precedence even if subpaths are explicitly being ignored.
That is I can't go with further iterations of inclusion-exclusion like in "ignore-me/**;!ignore-me/but-not-me;ignore-me/but-not-me/me-as-well"
I'm not saying this is a super important use case to support - but rather that the behavior in that case is not clear without looking at the code.
So I would consider maybe having the paths "not to ignore" on a different config var and make clear it has the last say.
Or if you don't like that suggestion - just add a short comment about it in the existing docs.
Thanks!
Hi @roekatz, thanks for your review. Yes, I confirm: a "path to not ignore" would always take precedence. It is also made explicit in the two tests i added:
I will make it more clear by adding a more explicit, punctual description in the documentation. Still, if you prefer to use a dedicated config var, pls do tell me :) Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing!
Will merge once I stabilize master tests :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry - if you can just fix the pre-commit errors. (You can run it locally, install pre-commit (brew install pre-commit
on Mac). Then within opal repo:
pre-commit install
pre-commit run --all-files
files have been reformatted ✅ |
@disaverio Great - Tests should now be fixed in master so if you can rebase we'll see we're green and have it merged. |
9fe5880
to
605841f
Compare
Hello @roekatz , the branch has been rebased. ty |
Fixes Issue
Closes #641
Changes proposed
!myFolder/subfolder/**
is defined in the variable then all the contents of it should not be ignored, even if the pathmyFolder/**
is defined to be ignored!myFolder
, then nothing is ignored: the default behavior still is "nothing is ignored, unless here explicitly defined"Check List (Check all the applicable boxes)
Screenshots
Note to reviewers