Kevin Meredith
Kevin Meredith

Reputation: 41939

Matching Error Level in FindBugs IntelliJ and Maven

I'm running FindBugs in Maven and my IntelliJ. I'd like to ensure that executing FindBugs in either tool results in the same analysis. It'd be confusing to developers if IntelliJ and Maven output different errors/warnings when running the static analysis tool.

Maven

    <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>2.5.4-SNAPSHOT</version>
    </plugin>

FindBugs-IDEA Setup

Configuration

I see that FindBugs can be configured in Maven with different Thresholds and Efforts, but how can I synchronize IntelliJ's and Maven's FindBugs config?

Example:

  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>findbugs-maven-plugin</artifactId>
    <version>2.5.4-SNAPSHOT</version>
    <configuration>
      <effort>Max</effort>
      <threshold>Low</threshold>
    ...
  </plugin>

http://mojo.codehaus.org/findbugs-maven-plugin/examples/violationChecking.html

Upvotes: 1

Views: 584

Answers (1)

Kevin Meredith
Kevin Meredith

Reputation: 41939

  1. Go to Settings (Control + Alt + S)
  2. Go to FindBugs
  3. Click Advanced (requires scrolling down in a tab - look at red boxed area in the below screenshot)
  4. Set Analysis Effort based on POM effort
  5. Set Confidence Level based on POM threshold

Advanced

Upvotes: 1

Related Questions