Commit 7e08339
authored
Declare formatter version to avoid spotless choosing a version (#1151)
diffplug/spotless#2503 (comment)
indicates that spotless chooses a formatter version based on the JDK
running the formatting process. The spotless maintainer recommends that
we declare a formatter version explicitly so that the formatter won't
change based on the JDK version.
Testing done:
MAVEN_OPTS=-Djansi.force=true mvn -B -Dstyle.color=always -ntp clean verify
In the winstone repository (where we saw the issue):
Reverted the change that made the formatting independent of Java version
in b95111923002d82598d4d85f67f40fa6170dda5e and then added explicit
spotless version definition to the pom file so that I could confirm that
changing Java versions does not change the formatting.
MarkEWaite/winstone@78ea965
has the details
. ~/bin/use_java17
mvn spotless:apply
git status
. ~/bin/use_java21
mvn spotless:apply
git status1 parent 40a14bd commit 7e08339
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
688 | 688 | | |
689 | 689 | | |
690 | 690 | | |
691 | | - | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
692 | 696 | | |
693 | 697 | | |
694 | 698 | | |
| |||
0 commit comments