-
Notifications
You must be signed in to change notification settings - Fork 459
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
Maven IDE hook #1782
Maven IDE hook #1782
Conversation
Thanks! In Gradle, the Do you plan to implement that here too? Or is only disk I/O enough for your case? If disk I/O is enough then we should be able to use |
I think I have just understood why it was implemented via stdout in the Gradle plugin. Retrieving the edited file from the stdout is much faster because we don't access the I/O file. Moreover, the file will be saved in the file system by the IDE, not directly by Spotless. Am I correct? If yes, then I'll try to replicate this feature in Maven and label the PR as a work in progress. Thanks) |
That would be great!
It's not about speed, it's about letting the user work without saving and clobbering changes on disk that perhaps they didn't want to save over.
The point of the IDE hook is to facilitate that process without saving to disk in between the various steps. Saving to disk is fine for an IDE plugin, but you can use |
Hi @nedtwigg!
|
Finally released in Once there is an IDE plugin working with the maven hook let me know, and we can update the docs to match and remove the |
Duplicate the IDE hook that is implemented for the Gradle plugin - #568
The main issue pertains to supporting Maven in an IntelliJ plugin - #200 (comment)
Currently, I utilize the
spotlessFiles
argument for Maven-based projects in my IntelliJ plugin to execute theapply
task only for the currently opened file in the editor. However, an IDE hook that accepts an absolute path is safer (as it's not a pattern) and a little more efficient.I have also updated the example of
spotlessFiles
usage in the README, as it cannot accept slashes in the pattern. Instead, it is necessary to provide the regex dot.