I'm a bit confused about how Spotless and ktlint w...
# ktlint
k
I'm a bit confused about how Spotless and ktlint work - we recently bumped to 0.48.2 and running
spotlessDiagnose
and
spotlessCheck
come back saying everything is fine, but running
spotlessApply
suddenly makes a whole bunch of changes. Why is this? Is there a way to make these tasks work correctly together?
p
I am not sure whether Spotless maintainers/users are following this channel. I am not familiar with how Spotless integrates with ktlint. Are you sure, that each of the tasks above use the same ktlint version? And do all tasks inspect exactly the same set of globs? If you can reproduce the problem with Ktlint CLI then I can help you further. Otherwise, you may want to contact the Spotless project directly.
k
Yeah, I think it's just something completely broken with spotless at the moment... Ktlint cli doesn't report any issues, but spotlessCheck does, but spotlessApply doesn't change anything and neither does ktlint -F