Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'may-spotless-apply' profile (#1017)
I often find myself forgetting to apply spotless before committing. On some repositories, I have set up a pre-commit git hook running `mvn spotless:check`. However, this has to be set up on each repository that has spotless check enabled, and disabled on those which don't. I think this goes one step further, by defining a conventional maven profile `may-spotless-apply` that will run `spotless:apply` *only* if spotless is enabled for the given repository. This allows any user to incorporate `-Pmay-spotless-apply` as part of their usual build command (or defined in their maven settings active profiles section), and have `spotless:apply` automatically called if the project has it enabled.
- Loading branch information