Hi Jochen,
I have put your concerns about subjective/annoying SPAM warnings (which
I share) into the "Warnings in Groovy" issue I created
(https://issues.apache.org/jira/browse/GROOVY-8570).
Using errors is evidently not possible in this case, and using an
external "code style" checking tool would not fulfill my intended
purpose due to its non-mandatory nature. The same goes for a Go-like
"code formatter tool", for which I think we also do not have the the
resources to create it (even though that would be nice).
Most importantly: You would never see any of these warnings in any case,
because why would you use Java- instead of Groovy-syntax in your code ?-)
Cheers,
mg
On 01.05.2018 17:20, Jochen Theodorou wrote:
On 01.05.2018 16:26, MG wrote:
I think we should do this, for cases where the rewards of adhering to
idiomatic Groovy are less obvious or it might be missed that there
even _is_ an idiomatic Groovy way to do things (I have heard some
people were not aware that array initialization without "as" was
supported in Groovy ;-) ).
Any particular thoughts on how to go about adding such warnings ?
if people care about my position:
* for me compiler warnings are useless. Either there is a problem,
then it is an error, or there is not, then there is no need for a
warning. C(++) is really bad here and Java also has a bad tradition on
this, that is getting worse. I used to work with gcc for example with
-Wall -Werror, which means to turn on most of the warnings and make
them errors.
* code styling is not the task of the compiler
* I have nothing against an extra tool, that tells people about coding
standards and idiomatic ways, as long as it is not part of the
compiler itself and I am not forced to use it. I really do not
appreciate sonar (nothing against the project really!) for example
telling me about the order of modifiers in my java code, just because
of some obscure readability aspect ;)
* and if you really want things to be aligned, do it like Go and make
a "code formatter tool" (it really has to be more than that), that
changes your code to "idiomatic" usage.
bye Jochen