You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beam.apache.org by Scott Wegner <sw...@google.com> on 2018/05/11 23:47:11 UTC

Enabling ErrorProne analysis on sdks-java-core

I just wanted to give a heads-up on pr/5319 [1], which makes sdks-java-core
ErrorProne-clean and upgrades ErrorProne analysis to produce build errors.

ErrorProne [2] is another static analysis tool which hooks into the Java
compilation process. Kenn added it as warnings during the Gradle migration
[3] and it found a number of issues. The issues were easy to fix and in my
opinion provide real value.

ErrorProne analysis is enabled for most other modules, but produces
warnings instead of errors. I encourage others to take a look at modules
they maintain and see if they can similarly enable warnings-as-errors to
keep modules ErrorProne-clean.

[1] https://github.com/apache/beam/pull/5319
[2] http://errorprone.info/
[3] https://github.com/apache/beam/pull/5161

Re: Enabling ErrorProne analysis on sdks-java-core

Posted by Kenneth Knowles <kl...@google.com>.
I think it would be awesome to have a "-Werror" hackathon to get this
turned on globally. This is a great way to protect the long-term health of
the codebase at a fine granularity. Basically, the sorts of things that if
you comment on them in a PR the author might think you are being annoying,
so you cannot trust social code review process to ensure. But they are
actually extraordinarily important when they add up.

Kenn

On Fri, May 11, 2018 at 4:47 PM Scott Wegner <sw...@google.com> wrote:

> I just wanted to give a heads-up on pr/5319 [1], which makes
> sdks-java-core ErrorProne-clean and upgrades ErrorProne analysis to produce
> build errors.
>
> ErrorProne [2] is another static analysis tool which hooks into the Java
> compilation process. Kenn added it as warnings during the Gradle migration
> [3] and it found a number of issues. The issues were easy to fix and in my
> opinion provide real value.
>
> ErrorProne analysis is enabled for most other modules, but produces
> warnings instead of errors. I encourage others to take a look at modules
> they maintain and see if they can similarly enable warnings-as-errors to
> keep modules ErrorProne-clean.
>
> [1] https://github.com/apache/beam/pull/5319
> [2] http://errorprone.info/
> [3] https://github.com/apache/beam/pull/5161
>