Extend IdeHook to support passing in multiple files #2774
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
A backwards compatible extension of the
IdeHookfuctionality that allow passing in multiple file paths in a comma separated list:What does this solve?
Our specific use-case is to allow efficient invocation in a pre-commit hook. This way we can simply pass in a list of staged files and fix them in a single call.
I can imagine this might also be useful for plugin development.
Changes
IdeHook.javaincluding it'sStateclass to enable handling multiple filesNotes
Review
Please let me know if you are missing anything in my PR/Description as its my first contribution to this repo! 🙂