You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by Enrico Olivelli <eo...@gmail.com> on 2021/02/24 16:40:13 UTC

Spotbugs exlusions files problem

Hello,
I noticed today that we are putting the findBugsExclude.xml file inside
src/main/resources.

This is not a good practice as we are going to put that file into the file
.jar file produced by every Maven module who has that file.

I suggest moving the file somewhere else.

We could also use @SuppressFBWarnings annotation, I feel it more practical:
- it is closer to the code, so you see that there is a Suppression when you
are working the Java file
- it is more robust to refactors (if you move the class or change the name
you have to update .xml files as well)

Regards
Enrico

Re: Spotbugs exlusions files problem

Posted by Sijie Guo <gu...@gmail.com>.
That is a good catch. We should move it to a different location.

- Sijie

On Wed, Feb 24, 2021 at 8:40 AM Enrico Olivelli <eo...@gmail.com> wrote:

> Hello,
> I noticed today that we are putting the findBugsExclude.xml file inside
> src/main/resources.
>
> This is not a good practice as we are going to put that file into the file
> .jar file produced by every Maven module who has that file.
>
> I suggest moving the file somewhere else.
>
> We could also use @SuppressFBWarnings annotation, I feel it more practical:
> - it is closer to the code, so you see that there is a Suppression when you
> are working the Java file
> - it is more robust to refactors (if you move the class or change the name
> you have to update .xml files as well)
>
> Regards
> Enrico
>