Perhaps it's just me, but ... If discussing formatting issues has been consuming a lot of your time, I would consider this time wasted. Especially as for newcomers this is particularly frustrating if you sort of provide the solution for a real problem and your response is "Yeah .... thanks fort hat ... but we use 4 spaces indentation and curly braces at the END of EVERY condition" ... I've been in that situation multiple times and some times just wen't away cause I just thought "WTF ... are these folks serious? I don't wanna be part of such a group".
Of course would an automated plugin help. In Go I am seeing this happen auotmatically all the time. But we should ask ourselves, if paying too much attention to some formatting rules is good. But ... that's just my personal opinion. Chris -----Ursprüngliche Nachricht----- Von: jincheng sun <[email protected]> Gesendet: Dienstag, 9. Februar 2021 07:39 An: [email protected] Betreff: [DISCUSS] I would like to propose using Spotless for IoTDB coding style check 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
