A custom ktlint reporter that annotates Kotlin lint issues directly in GitHub PRs using official GitHub workflow commands.
- ✅ Integrates seamlessly with GitHub Actions
- 🎯 Supports
error,warning,notice, ornonelevels - 📦 Published to Maven Central
Download the latest JAR from the Releases page:
ktlint --reporter=github,artifact=ktlint-github-reporter.jarSet the annotation level (default is error):
ktlint --reporter=github?level=warning,artifact=ktlint-github-reporter.jarrepositories {
mavenCentral()
}
dependencies {
implementation "de.musichin.ktlint.reporter:ktlint-reporter-github:x.y.z"
}<dependency>
<groupId>de.musichin.ktlint.reporter</groupId>
<artifactId>ktlint-reporter-github</artifactId>
<version>x.y.z</version>
</dependency>Use in a GitHub Actions workflow:
steps:
- uses: actions/checkout@v4
- name: Run ktlint with GitHub reporter
run: ktlint --reporter=github,artifact=ktlint-github-reporter.jarAlternatively, use the ktlint-check GitHub Action:
- uses: musichin/ktlint-check@v4
with:
ktlint-version: '1.8.0'
level: warningThis action internally uses this reporter.
| Option | Description | Default |
|---|---|---|
level |
Sets severity level: error, warning, notice, or none |
error |
MIT License © 2025 Anton Musichin
