Skip to content

Suchitainf/action-checkstyle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Checkstyle for Java GitHub Action

Test reviewdog depup release GitHub release (latest SemVer) action-bumpr supported

This is a GitHub action to run Checkstyle check on your Java code and report status via reviewdog on pull request.

Input

checkstyle_config

Checkstyle configuration specifies which ruleset to apply during the scan. There are two built-in configurations in checkstyle: [google_checks.xml, sun_checks.xml].

It is also possible to supply your custom Checkstyle configuration file located in the same directory.

Default: google_checks.xml

workdir

Working directory relative to the root directory.

Default: .

level

Report level for reviewdog.

Values: [info, warning, error]

Default: info

reporter

Reporter of reviewdog command.

Values: [github-pr-check, github-check, github-pr-review]

Default: github-pr-check

filter_mode

Filtering mode for the reviewdog command.

Values: [added, diff_context, file, nofilter]

Default: added

fail_on_error

Exit code for reviewdog when errors are found.

Values: [true, false]

Default: false

reviewdog_flags

Additional reviewdog flags.

Default: ``

Usage

name: reviewdog
on: [pull_request]
jobs:
  checkstyle:
    name: runner / checkstyle
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: dbelyaev/[email protected]
        with:
          github_token: ${{ secrets.github_token }}
          # Change reviewdog reporter if you need [github-pr-check, github-check, github-pr-review].
          reporter: github-pr-review
          # Change reporter level if you need [info,warning,error].
          # GitHub Status Check won't become failure with a warning.
          level: warning

About

reviewdog based GitHub action to run Checkstyle on your java code

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 50.4%
  • Dockerfile 49.6%