spotlessApply stopped working
Not sure when or why, but spotlessApply isn't working. We have one of the most awkward build setups with android tests and doubly mapped test source paths, so possibly at this point.
Overall, from a clean checkout we should be generating clean code without fighting the tools by default or with a single command. Currently Intellij and AS defaults cause a lot of differences. Maybe .editorconfig is the solution?
@swankjesse is there a gold standard for project setup here? Spotless or otherwise.
Just what's in these projects’ official documentation.
Any interest in pursuing the work in https://github.com/square/okhttp/pull/7126 ? OkHttp may be interested in activated cleanthat (both as a Github App to clean PRs, and as a Spotless plugin) to automatically apply some linting rules.
Yes, but only if it works well, low friction and isn't annoying to humans (IDE matches CI). :)
Last time we reverted IIRC because of angst it caused
As @Goooler previously, I'm willing to give a hand. I understand we agreed a PR should be opened by an okhttp maintainer as many files may be reformatted in the initial PR. (We may also target an initial PR not to impact many files, and add rules through time).
My personal interest is to activate cleanthat for automatic linting (on top of Spotless, or through a Github app for PR cleaning) (java-code only for now). But I'm fine giving a hand even if you need only formatting.
IDE would match CI by either relying on a standard formatters (Eclipse, Google java Format, etc), and/or relying on some IDE-plugins (e.g. there is Intellij|VisualStudio plugins to apply Spotless).
I suggest you open a PR, starting from https://github.com/square/okhttp/commit/dfef48dd3654854bf6b24ed00fccb0142e81722a as suggested here (https://github.com/square/okhttp/pull/7126#issuecomment-1053949844) and we discuss what's not satisfactory?
cc @swankjesse you ok with this plan? Or still want to avoid the mass reformat?
When we've looked at automating this, we haven't gotten agreement. Closing.