Home > TIP > How to make findbugs ignore some class?

How to make findbugs ignore some class?

Easy TIP to ignore some given class/package from FindBugs. This could be useful when you are dealing with third-party codes.

You should have a exclusions.xml configured in your findbugs build process.

All Match that you put inside this file will be ignored by FindBugs.

So with that in mind to ignore a class or whole package try to use the classregex like this one below:

<FindBugsFilter>
  <Match classregex="com.your.class.package.*" />
</FindBugsFilter>

Thats it.
Cheers

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: