[DISCUSSION] Error prone plugin on codebase

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[DISCUSSION] Error prone plugin on codebase

clebertsuconic
Thiago Kronig has recently added error prone to the Artemis codebase,
so any mistakes would be noticed at compilation time.

I actually liked it quite a lot... Liking even more now as I realize
what is doing :)



I'm now cleaning up all the warnings we had on the codebase based on
the plugin and I'm pushing the parameters a step further:

These following mistakes will now be reported as compilation errors:

<arg>-Xep:NonAtomicVolatileUpdate:ERROR</arg>
<arg>-Xep:SynchronizeOnNonFinalField:ERROR</arg>
<arg>-Xep:StaticAccessedFromInstance:ERROR</arg>
<arg>-Xep:WaitNotInLoop:ERROR</arg>


For more information on their meaning:

http://errorprone.info/bugpattern/NonAtomicVolatileUpdate
http://errorprone.info/bugpattern/SynchronizeOnNonFinalField
http://errorprone.info/bugpattern/StaticAccessedFromInstance
http://errorprone.info/bugpattern/WaitNotInLoop


Any objections?
https://github.com/apache/activemq-artemis/pull/7


Clebert
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Error prone plugin on codebase

Thiago Kronig
Just explaining a bit: Error Prone differs on Pmd and FindBugs as it works
at compile time, leveraging the AST to do the work. Or can be very helpful
as it emits compile warnings and errors.

We could, of course, just limit to a specific profile, as it is plugged as
a build maven plugin.

On Thu, May 28, 2015, 23:34 Clebert Suconic <[hidden email]>
wrote:

> Thiago Kronig has recently added error prone to the Artemis codebase,
> so any mistakes would be noticed at compilation time.
>
> I actually liked it quite a lot... Liking even more now as I realize
> what is doing :)
>
>
>
> I'm now cleaning up all the warnings we had on the codebase based on
> the plugin and I'm pushing the parameters a step further:
>
> These following mistakes will now be reported as compilation errors:
>
> <arg>-Xep:NonAtomicVolatileUpdate:ERROR</arg>
> <arg>-Xep:SynchronizeOnNonFinalField:ERROR</arg>
> <arg>-Xep:StaticAccessedFromInstance:ERROR</arg>
> <arg>-Xep:WaitNotInLoop:ERROR</arg>
>
>
> For more information on their meaning:
>
> http://errorprone.info/bugpattern/NonAtomicVolatileUpdate
> http://errorprone.info/bugpattern/SynchronizeOnNonFinalField
> http://errorprone.info/bugpattern/StaticAccessedFromInstance
> http://errorprone.info/bugpattern/WaitNotInLoop
>
>
> Any objections?
> https://github.com/apache/activemq-artemis/pull/7
>
>
> Clebert
>
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Error prone plugin on codebase

Thiago Kronig
It can be very helpful*

On Fri, May 29, 2015, 02:46 Thiago Kronig <[hidden email]> wrote:

> Just explaining a bit: Error Prone differs on Pmd and FindBugs as it works
> at compile time, leveraging the AST to do the work. Or can be very helpful
> as it emits compile warnings and errors.
>
> We could, of course, just limit to a specific profile, as it is plugged as
> a build maven plugin.
>
> On Thu, May 28, 2015, 23:34 Clebert Suconic <[hidden email]>
> wrote:
>
>> Thiago Kronig has recently added error prone to the Artemis codebase,
>> so any mistakes would be noticed at compilation time.
>>
>> I actually liked it quite a lot... Liking even more now as I realize
>> what is doing :)
>>
>>
>>
>> I'm now cleaning up all the warnings we had on the codebase based on
>> the plugin and I'm pushing the parameters a step further:
>>
>> These following mistakes will now be reported as compilation errors:
>>
>> <arg>-Xep:NonAtomicVolatileUpdate:ERROR</arg>
>> <arg>-Xep:SynchronizeOnNonFinalField:ERROR</arg>
>> <arg>-Xep:StaticAccessedFromInstance:ERROR</arg>
>> <arg>-Xep:WaitNotInLoop:ERROR</arg>
>>
>>
>> For more information on their meaning:
>>
>> http://errorprone.info/bugpattern/NonAtomicVolatileUpdate
>> http://errorprone.info/bugpattern/SynchronizeOnNonFinalField
>> http://errorprone.info/bugpattern/StaticAccessedFromInstance
>> http://errorprone.info/bugpattern/WaitNotInLoop
>>
>>
>> Any objections?
>> https://github.com/apache/activemq-artemis/pull/7
>>
>>
>> Clebert
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Error prone plugin on codebase

christopher.l.shannon
+1 for adding Error Prone and for adding those 4 mistakes. It should
probably be enabled by default since it is compile time and it will help
catch problems early.

On Fri, May 29, 2015 at 1:47 AM, Thiago Kronig <[hidden email]>
wrote:

> It can be very helpful*
>
> On Fri, May 29, 2015, 02:46 Thiago Kronig <[hidden email]> wrote:
>
> > Just explaining a bit: Error Prone differs on Pmd and FindBugs as it
> works
> > at compile time, leveraging the AST to do the work. Or can be very
> helpful
> > as it emits compile warnings and errors.
> >
> > We could, of course, just limit to a specific profile, as it is plugged
> as
> > a build maven plugin.
> >
> > On Thu, May 28, 2015, 23:34 Clebert Suconic <[hidden email]>
> > wrote:
> >
> >> Thiago Kronig has recently added error prone to the Artemis codebase,
> >> so any mistakes would be noticed at compilation time.
> >>
> >> I actually liked it quite a lot... Liking even more now as I realize
> >> what is doing :)
> >>
> >>
> >>
> >> I'm now cleaning up all the warnings we had on the codebase based on
> >> the plugin and I'm pushing the parameters a step further:
> >>
> >> These following mistakes will now be reported as compilation errors:
> >>
> >> <arg>-Xep:NonAtomicVolatileUpdate:ERROR</arg>
> >> <arg>-Xep:SynchronizeOnNonFinalField:ERROR</arg>
> >> <arg>-Xep:StaticAccessedFromInstance:ERROR</arg>
> >> <arg>-Xep:WaitNotInLoop:ERROR</arg>
> >>
> >>
> >> For more information on their meaning:
> >>
> >> http://errorprone.info/bugpattern/NonAtomicVolatileUpdate
> >> http://errorprone.info/bugpattern/SynchronizeOnNonFinalField
> >> http://errorprone.info/bugpattern/StaticAccessedFromInstance
> >> http://errorprone.info/bugpattern/WaitNotInLoop
> >>
> >>
> >> Any objections?
> >> https://github.com/apache/activemq-artemis/pull/7
> >>
> >>
> >> Clebert
> >>
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Error prone plugin on codebase

Lazar Bankovic
In reply to this post by clebertsuconic
unsubscribe

2015-05-29 4:33 GMT+02:00 Clebert Suconic <[hidden email]>:

> Thiago Kronig has recently added error prone to the Artemis codebase,
> so any mistakes would be noticed at compilation time.
>
> I actually liked it quite a lot... Liking even more now as I realize
> what is doing :)
>
>
>
> I'm now cleaning up all the warnings we had on the codebase based on
> the plugin and I'm pushing the parameters a step further:
>
> These following mistakes will now be reported as compilation errors:
>
> <arg>-Xep:NonAtomicVolatileUpdate:ERROR</arg>
> <arg>-Xep:SynchronizeOnNonFinalField:ERROR</arg>
> <arg>-Xep:StaticAccessedFromInstance:ERROR</arg>
> <arg>-Xep:WaitNotInLoop:ERROR</arg>
>
>
> For more information on their meaning:
>
> http://errorprone.info/bugpattern/NonAtomicVolatileUpdate
> http://errorprone.info/bugpattern/SynchronizeOnNonFinalField
> http://errorprone.info/bugpattern/StaticAccessedFromInstance
> http://errorprone.info/bugpattern/WaitNotInLoop
>
>
> Any objections?
> https://github.com/apache/activemq-artemis/pull/7
>
>
> Clebert
>