Open alexmiranda opened 1 year ago
I think you should be able to do something with the fileNamesPattern config option, which is used like this - https://github.com/spotify/fmt-maven-plugin/blob/main/src/main/java/com/spotify/fmt/Formatter.java#L104.
fileNamesPattern is a regex, so something like (path-to-first-file|path-to-second-file....) should do, if you can build up that regex in your pre-commit hook.
Is there any way to apply formatting to git staged files only? e.g. invoked with a pre-commit hook