<commit_before># gradle-code-quality-tools-plugin

Gradle plugin that configures [Error Prone](http://errorprone.info/), [Checkstyle](http://checkstyle.sourceforge.net/), [PMD](https://pmd.github.io/), [CPD](https://pmd.github.io/pmd-6.0.0/#cpd), [Lint](https://developer.android.com/studio/write/lint.html), [Detekt](https://github.com/arturbosch/detekt) & [Ktlint](https://github.com/shyiko/ktlint). All of these tools are also automatically hooked into the `check` gradle task. Below, I'll go more into depth how each of those plugins are configured.

This plugin requires Gradle 5.0 or later.

# Set up

**root/build.gradle**

```gradle
buildscript {
  repositories {
    mavenCentral()
    google()
    gradlePluginPortal()
  }
  dependencies {
    classpath "com.vanniktech:gradle-code-quality-tools-plugin:0.18.0"
  }
}

apply plugin: "com.vanniktech.code.quality.tools"
```

Information: [This plugin is also available on Gradle plugins](https://plugins.gradle.org/plugin/com.vanniktech.code.quality.tools)

### Snapshot

```gradle
buildscript {
  repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
  }
  dependencies {
    classpath "com.vanniktech:gradle-code-quality-tools-plugin:0.19.0-SNAPSHOT"
  }
}

apply plugin: "com.vanniktech.code.quality.tools"
```<commit_msg>Mention why we need gradlePluginPortal in the README (#189)<commit_after># gradle-code-quality-tools-plugin

Gradle plugin that configures [Error Prone](http://errorprone.info/), [Checkstyle](http://checkstyle.sourceforge.net/), [PMD](https://pmd.github.io/), [CPD](https://pmd.github.io/pmd-6.0.0/#cpd), [Lint](https://developer.android.com/studio/write/lint.html), [Detekt](https://github.com/arturbosch/detekt) & [Ktlint](https://github.com/shyiko/ktlint). All of these tools are also automatically hooked into the `check` gradle task. Below, I'll go more into depth how each of those plugins are configured.

This plugin requires Gradle 5.0 or later.

# Set up

**root/build.gradle**

```gradle
buildscript {
  repositories {
    mavenCentral()
    google()
    gradlePluginPortal() // Required for the Errorprone Gradle Plugin.
  }
  dependencies {
    classpath "com.vanniktech:gradle-code-quality-tools-plugin:0.18.0"
  }
}

apply plugin: "com.vanniktech.code.quality.tools"
```

Information: [This plugin is also available on Gradle plugins](https://plugins.gradle.org/plugin/com.vanniktech.code.quality.tools)

### Snapshot

```gradle
buildscript {
  repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
  }
  dependencies {
    classpath "com.vanniktech:gradle-code-quality-tools-plugin:0.19.0-SNAPSHOT"
  }
}

apply plugin: "com.vanniktech.code.quality.tools"
```
{'fraction_non_alphanumeric': 0.15226939970717424, 'fraction_numerical': 0.01061493411420205, 'mean_word_length': 4.390532544378698, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, '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': '1286080', 'n_tokens_mistral': 978, 'n_tokens_neox': 930, 'n_words': 182}