Hi folks, I found that many projects use Spotless to save the time of both contributors and reviewers.
I like Spotless[1] because it can be used to both check and apply a style. Then we need a formatter(e.g.: google-java-format) that works with Spotless. The pretty good thing about Spotless is that it serves as a verifier for CI but can also apply the configured style automatically. That is, for the programmer all we should to do is `mvn spotless:apply` to fix any style violations. We also have to decide on a coding style if we decide to use Spotless. and I would propose google-java-format. (It's seems IoTDB project already prefer Google's code specification, at present, iotdb uses GoogleStyle [2]) So what benefits will Spotless bring us: - No longer fussy about the coding style in reviews, which makes it easier for reviewers and contributors to understand - There is no need to fix check style errors manually because Spotless can fix them automatically Currently, Spotless has been used in many projects, such as: Apache Beam [3], Apache Flink [4], Apache Kafka [5] Apache avro [6] etc. In short words, I believe that the introduction of Spotless will save us a lot of time and focus more on the development of features. If you agree to use Spotless, I will create the JIRA. for tracking and add the detailed design and POC. What are your thoughts? --------- Finally, on the occasion of the Chinese Lunar New Year, I wish community of IoTDB better and better. I wish you a happy new year, all the best for 2021. :) ㊗️福大家,牛年大吉! Best, Jincheng 2021.02.09 [1] https://github.com/diffplug/spotless [2] https://github.com/apache/iotdb/blob/master/java-google-style.xml [3] https://github.com/apache/beam/blob/b74fcf7b30d956fb42830d652a57b265a1546973/buildSrc/build.gradle#L23 [4] https://github.com/apache/flink/blob/4a5ef8af0bbc49d738717ae477576c172e60e62c/pom.xml#L159 [5] https://github.com/apache/kafka/blob/42a9355e606bd2bbdb7fd0dd348805e6666dc189/build.gradle#L44 [6] https://github.com/apache/avro/blob/8026c8ffe4ef67ab419dba73910636bf2c1a691c/lang/java/pom.xml#L307-L334