<commit_before># findbugs4sbt - Static code analysis via FindBugs from within SBT

This SBT plug-in enables you to analyze your (Java) code with the help of the great **[FindBugs](http://findbugs.sourceforge.net/)** tool. It defines a `findbugs` sbt action for that purpose.

Version 1.4.0 of this plug-in is available for SBT 0.13.x.

## Getting findbugs4sbt

findbugs4sbt is hosted at the [sbt Community Repository](http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases). This repository is automatically available from within SBT. This means that you just have to add findbugs4sbt as a plug-in to your project (see the next section).

If you want to go bleeding edge, you can also:

    git clone https://github.com/sbt/findbugs4sbt.git
    cd findbugs4sbt 
    sbt publish-local

### Adding findbugs4sbt as a plug-in to your project

Add the following to your project's `build.sbt` file:

```scala
import de.johoop.findbugs4sbt.FindBugs._

findbugsSettings
```

Also, you have to add the plugin dependency to your project's `./project/plugins.sbt` or the global  `.sbt/plugins/build.sbt`:

```scala
addSbtPlugin("de.johoop" % "findbugs4sbt" % "1.4.0")
```

The old settings specified below are still mostly valid, but they're now specified using the settings system of SBT 0.13.

## Defining exclude/include filters

### Defining filters inline

Just use Scala inline XML for the setting, for example:

```scala
findbugsIncludeFilters := Some(<FindBugsFilter>
  <Match>
    <Class name="de.johoop.Meep" />
  </Match>
</FindBugsFilter>)
```
<commit_msg>README.md edited online with Bitbucket<commit_after># findbugs4sbt - Static code analysis via FindBugs from within SBT

This SBT plug-in enables you to analyze your (Java) code with the help of the great **[FindBugs](http://findbugs.sourceforge.net/)** tool. It defines a `findbugs` sbt action for that purpose.

Version 1.4.0 of this plug-in is available for SBT 0.13.x.

## Getting findbugs4sbt

findbugs4sbt is hosted at the [sbt Community Repository](http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases). This repository is automatically available from within SBT. This means that you just have to add findbugs4sbt as a plug-in to your project (see the next section).

If you want to go bleeding edge, you can also:

    sbt publishLocal

### Adding sbt-findbugs-plugin as a plug-in to your project

Add the following to your project's `build.sbt` file:

```scala
import de.johoop.findbugs4sbt.FindBugs

FindBugs.findbugsSettings
```

Also, you have to add the plugin dependency to your project's `./project/plugins.sbt` or the global `.sbt/plugins/build.sbt`:

```scala
addSbtPlugin("de.johoop" % "findbugs4sbt" % "1.4.0")
```

The old settings specified below are still mostly valid, but they're now specified using the settings system of SBT 0.13.

## Defining exclude/include filters

### Defining filters inline

Just use Scala inline XML for the setting, for example:

```scala
findbugsIncludeFilters := Some(<FindBugsFilter>
  <Match>
    <Class name="de.johoop.Meep" />
  </Match>
</FindBugsFilter>)
```

{'fraction_non_alphanumeric': 0.10045513654096229, 'fraction_numerical': 0.012678803641092327, 'mean_word_length': 4.323529411764706, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3122960', 'n_tokens_mistral': 1043, 'n_tokens_neox': 962, 'n_words': 369}