Hey folks,

Adar suggested I give a heads up to a wider audience in case people missed
the code reviews this past week. So... heads up:

Earlier this week we committed c55ddd9bc85094c5f780427c3fc82b2219015d24
which switches the Java compiler as used by Gradle from the normal javac to
'error-prone'. Error-prone is a sort of plugin for javac which enhances the
set of warnings and errors provided at compile time. Aside from generating
a wider variety of warnings and errors, it otherwise behaves just like
javac. You can read more about error-prone at http://errorprone.info

Enabling it has already detected several bugs, eg:
6a32001c25527586ba5ba0bf71abdf6b14743f32 - misplaced reference equality
check which could result in wrong predicate pruning
4969989fd0cc02c26993c6a897bd274833800a5c - small bug in the Parquet
importer job
7bd582ab78afebc1f338900b5e2ccf3e97fb3c66 - another decimal-related bug with
an accidental case fallthrough

It also generated a bunch of warnings about bad practice that weren't
functional issues but helped clean up bits and pieces of the code and avoid
future issues.

Note that I only enabled error-prone via gradle and not via maven. Also
note that your IDE won't be aware of errors and warnings generated by
error-prone unless you take some extra steps. It appears that there is a
plugin for IntelliJ: http://errorprone.info/docs/installation

Currently I've set up error-prone to only generate warnings and not fail
the build even for errors it considers to be serious. So, even if you don't
configure your IDE specially, you shouldn't see any new failures on gerrit,
etc, due to these warnings. But, please let's all try to keep it "clean".

Many of the warnings and errors from error-prone overlap with the warnings
and errors from SpotBugs. Grant has separately been working on enabling
SpotBugs and fixing the errors that it finds. I'll let him follow up if
there's anything devs need to know about that.

Thanks
-Todd

-- 
Todd Lipcon
Software Engineer, Cloudera

Reply via email to