Re: [DISCUSS] Applying scalafmt to core code

2018-08-13 Thread Colin McCabe
On Wed, Aug 8, 2018, at 10:19, Ray Chiang wrote: > By doing piecemeal formatting, I don't think we can do a "hard" > enforcement on using scalafmt with every PR, but by allowing the tool to > run on already modified files in a patch, we can slowly migrate towards > getting the entire code base c

Re: [DISCUSS] Applying scalafmt to core code

2018-08-08 Thread Ray Chiang
By doing piecemeal formatting, I don't think we can do a "hard" enforcement on using scalafmt with every PR, but by allowing the tool to run on already modified files in a patch, we can slowly migrate towards getting the entire code base clean.  The trade offs are pretty standard (giant patch p

Re: [DISCUSS] Applying scalafmt to core code

2018-08-07 Thread Colin McCabe
Hmm. It would be unfortunate to make contributors include unrelated style changes in their PRs. This would be especially hard on new contributors who might not want to make a large change. If we really want to do something like this, I would vote for A1. Just do the change all at once and ge

Re: [DISCUSS] Applying scalafmt to core code

2018-08-07 Thread Guozhang Wang
Hello Ray, I saw on the original PR Jason (cc'ed) expressed a concern comparing scalafmt with scalastyle: the latter will throw exceptions in the build process to notify developers while the former will automatically reformat the code that developers may not be aware of. So I think maybe Jason can

[DISCUSS] Applying scalafmt to core code

2018-07-30 Thread Ray Chiang
I had started on KAFKA-2423 (was Scalastyle, now Expand scalafmt to core).  As part of the cleanup, applying the "gradlew spotlessApply" command ended up affecting too many (435 out of 439) files.  Since this will affect every file, this sort of change does risk polluting the git logs. So, I'