An open API service indexing awesome lists of open source software.

https://github.com/unchai/checkstyle-github-maven-plugin

A maven plugin that leaves comment of the result of a "Checkstyle" on github's pull request.
https://github.com/unchai/checkstyle-github-maven-plugin

checkstyle github maven maven-plugin pull-requests

Last synced: 5 months ago
JSON representation

A maven plugin that leaves comment of the result of a "Checkstyle" on github's pull request.

Awesome Lists containing this project

README

          

# checkstyle-github-maven-plugin

[![Build Status](https://img.shields.io/travis/unchai/checkstyle-github-maven-plugin.svg)](https://travis-ci.org/unchai/checkstyle-github-maven-plugin)

A maven plugin that leaves comment of the result of a "Checkstyle" on github's pull request.

![Example](example.jpg)

### Requirements

* Maven 3
* Java 8

### Install

```xml

...

com.github.unchai
checkstyle-github-maven-plugin
LATEST_VERSION

[Checkstyle configuration file]


...

```

### Usage

```shell
$ mvn checkstyle-github:checkstyle-github \
-Dgithub.endpoint= \
-Dgithub.token= \
-Dgithub.repository= \
-Dgithub.pullRequest=
```

#### with Jenkinsfile

```
node {
stage('lint') {
if (env.CHANGE_ID) {
withCredentials([[$class: 'StringBinding', credentialsId: 'github-bot', variable: 'GITHUB_ACCESS_TOKEN']]) {
sh "'${pwd()}/mvnw' clean checkstyle-github:checkstyle-github" +
" -Dgithub.token=${GITHUB_ACCESS_TOKEN}" +
" -Dgithub.repository=owner/repo" +
" -Dgithub.pullRequest=${env.CHANGE_ID}"
}
}
}
}
```

## License

Apache License 2.0 © 2018 [unchai](https://github.com/unchai)