dbelyaev / action-checkstyle

reviewdog based GitHub action to run Checkstyle on your Java code.
MIT License
21 stars 18 forks source link
checkstyle code-quality code-review github-action java reviewdog

Checkstyle for Java GitHub Action

Test reviewdog depup release action-bumpr supported

GitHub release (latest SemVer) OpenSSF Scorecard Contributor Covenant

This is a GitHub action to run Checkstyle checks on your Java code and report the status via reviewdog on pull requests.

Example

An example of how the reported Checkstyle violations will look on a pull request is shown below (link to example PR):

PR comment with violation

Usage

name: reviewdog
on: [pull_request]
jobs:
  checkstyle:
    name: runner / checkstyle
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dbelyaev/action-checkstyle@master
        with:
          github_token: ${{ secrets.github_token }}
          reporter: github-pr-review
          level: warning

Input parameters

Checkstyle parameters

Reviewdog parameters