-
Notifications
You must be signed in to change notification settings - Fork 35
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
lsp: Support file ignore config #620
Conversation
f1c1f41
to
b8c3556
Compare
Fixes: #589 This PR makes the filtering logic support a new rootDir prefix. When set, this will be stripped from file paths before testing their ignore status. I have tried to add tests to explain the new functionality. Signed-off-by: Charlie Egan <charlie@styra.com>
b8c3556
to
48ef185
Compare
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.
Very nice!
@@ -12,7 +12,12 @@ import ( | |||
"github.com/open-policy-agent/opa/bundle" | |||
) | |||
|
|||
func FilterIgnoredPaths(paths, ignore []string, checkFileExists bool) ([]string, error) { | |||
func FilterIgnoredPaths(paths, ignore []string, checkFileExists bool, rootDir string) ([]string, error) { |
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.
This is a breaking change, I guess, but hopefully not one anyone has come to rely on 😬 And if they did, it should be easy to fix.
Long term, I'm hoping we can have this removed entirely in favor of doing all filtering / config work in Rego, so good thing we have that beta disclaimer in the readme stil 😅
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.
Discussed on slack, after being unable to find any public integrations based on this we have opted to merge and leave a note in the release.
Fixes: StyraInc#589 This PR makes the filtering logic support a new rootDir prefix. When set, this will be stripped from file paths before testing their ignore status. I have tried to add tests to explain the new functionality. Signed-off-by: Charlie Egan <charlie@styra.com>
Fixes: #589
This PR makes the filtering logic support a new rootDir prefix. When set, this will be stripped from file paths before testing their ignore status.
Screen.Recording.2024-04-03.at.15.35.31.mov