If you are submitting a bug, please include the following:
When formatting an individual file using Spotless's IDE hook, repeatedly invoking spotlessApply fails to apply fixes to the file after the first run if the changes are undone in between runs. I can reproduce this using the Intellij plugin and directly on the command line. I've linked a repo below containing a reproduction of the issue.
Current behavior:
If I run spotlessApply -PspotlessIdeHook=/path/to/my/file more than once, undoing the formatting changes after the first invocation, subsequent invocations won't apply changes to the file.
Expected behavior:
Spotless should be consistent and idempotent, so I should be able to run it as many times as I want and get the same output each time.
spotless {
java {
endWithNewline()
}
}
If you are submitting a bug, please include the following:
When formatting an individual file using Spotless's IDE hook, repeatedly invoking
spotlessApplyfails to apply fixes to the file after the first run if the changes are undone in between runs. I can reproduce this using the Intellij plugin and directly on the command line. I've linked a repo below containing a reproduction of the issue.Current behavior:
If I run
spotlessApply -PspotlessIdeHook=/path/to/my/filemore than once, undoing the formatting changes after the first invocation, subsequent invocations won't apply changes to the file.Expected behavior:
Spotless should be consistent and idempotent, so I should be able to run it as many times as I want and get the same output each time.
Gradle 8.11.1
7.0.0.BETA4
Linux 5.15.0-126-generic amd64
https://github.com/micah-press/mp-spotless-bug-demo
gradlew spotless[Apply/Check] --stacktraceN/A