ktlint-pr-comments icon indicating copy to clipboard operation
ktlint-pr-comments copied to clipboard

Github Action for running ktlint (https://ktlint.github.io/) in all .kt files that were changed in a PR.

trafficstars

Ktlint PR comments v1.2

This action runs ktlint against all .kt files that were changed in a PR and makes a line comment for every error that ktlint found.

Note that in order to make a comment the error must be in a line that is part of the PR's diff.

Usage

- uses: le0nidas/[email protected]
  with:
    repotoken: ${{ secrets.GITHUB_TOKEN }}
    arguments: "--disabled_rules=parameter-list-wrapping,final-newline"

Example

The code:

class Person(val name: String, val age: Int) {
}

will produce the comment:

screenshot