[
https://issues.apache.org/jira/browse/GROOVY-8570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16470897#comment-16470897
]
mgroovy commented on GROOVY-8570:
---------------------------------
And in general: Come on guys, it's only support for warnings, which basically
every other computer language has. Yes they can easily be abused, by warning
about things you do not consider a problem, or which you cannot fix. Then you
supress them. I do the same in IntelliJ, whose Intellisense warnings are way
more annoying than compiler warnings, since they mark the code as "faulty" in
the editor: Every time an IntelliJ update wipes my Groovy warnings settings, I
turn most of them off again.
Every new warning to be introduced above the two proposed ones above would need
to be approved by you guys anyway. And: One can bump down the warning level of
individual warnings in the future, or remove them completely, if it turns out
they do not make sense - and it's not a breaking change - because they are
just, well, warnings...
> Support Warnings in Groovy Compiler
> -----------------------------------
>
> Key: GROOVY-8570
> URL: https://issues.apache.org/jira/browse/GROOVY-8570
> Project: Groovy
> Issue Type: New Feature
> Components: Compiler
> Affects Versions: 3.0.0-alpha-3
> Reporter: mgroovy
> Priority: Major
>
> * To warn Java developers using e.g. non-idiomatic Groovy constructs which
> only exist to support copy-and-paste Java-to-Groovy code compatibility, The
> Groovy compiler should support compiler warnings in addition to compiler
> errors.
> * Warnings should by default only be emitted in special circumstances such
> as the one described above, and not spam developers with an endless stream
> of, often subjectve, messages on "how to use Groovy correctly".
> * Sample warnings:
> # WARNING: Using curly braces Java style array literals (\{...}) is not
> idiomatic Groovy. To avoid confusion with Groovy closures, it is recommended
> to use the performance-identical Groovy square bracket list literal syntax
> ([...]) instead.
> # WARNING: The 'var' keyword is currently only an alias to 'def' (i.e.
> Object) in Groovy. To get reassignment type safety use an explicit type
> instead.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)