|
1 | | -name: "Checkstyle for Java" |
| 1 | +name: "Java Checkstyle Reviewer" |
2 | 2 | # description should be no more than 125 characters! |
3 | | -description: "🐶 Run checkstyle analysis on Java code and report results directly to pull request with the help of reviewdog." |
| 3 | +description: "Enforce Java code standards in PRs with inline feedback. Powered by Checkstyle + reviewdog for GitHub integration." |
4 | 4 | author: "Dmitriy Belyaev" |
5 | 5 | inputs: |
6 | 6 | github_token: |
7 | | - description: "GITHUB_TOKEN" |
| 7 | + description: "GitHub token for API authentication. Use secrets.GITHUB_TOKEN for automatic authentication." |
8 | 8 | default: "${{ github.token }}" |
9 | 9 | workdir: |
10 | | - description: "Working directory relative to the root directory." |
| 10 | + description: "Working directory for Checkstyle analysis, relative to the repository root." |
11 | 11 | default: "." |
12 | 12 | ### Flags for reviewdog ### |
13 | 13 | level: |
14 | | - description: "Report level for reviewdog [info, warning, error]" |
| 14 | + description: "Severity level for reported violations [info, warning, error]. Affects GitHub status check results." |
15 | 15 | default: "info" |
16 | 16 | reporter: |
17 | | - description: "Reporter of reviewdog command [github-pr-check, github-pr-review]." |
| 17 | + description: "How reviewdog reports violations [github-pr-check, github-check, github-pr-review]. See reviewdog documentation for details." |
18 | 18 | default: "github-pr-check" |
19 | 19 | filter_mode: |
20 | 20 | description: | |
21 | | - Filtering mode for the reviewdog command [added, diff_context, file, nofilter]. |
22 | | - Default is added. |
| 21 | + Filtering mode for reviewdog [added, diff_context, file, nofilter]. |
| 22 | + Controls which files/lines are analyzed. See reviewdog documentation for details. |
23 | 23 | default: "added" |
24 | 24 | fail_level: |
25 | 25 | description: | |
26 | | - Exits code 1 when errors are found at that level or above. Options are [none, any, error, warning, info] |
27 | | - Default is `none`. |
| 26 | + When to fail the workflow [none, any, info, warning, error]. |
| 27 | + Set to fail when violations at or above the specified severity are found. Default 'none' never fails. |
28 | 28 | default: "none" |
29 | 29 | reviewdog_flags: |
30 | | - description: "Additional reviewdog flags" |
| 30 | + description: "Additional flags to pass to the reviewdog command." |
31 | 31 | default: "" |
32 | 32 | ### Flags for checkstyle ### |
33 | 33 | checkstyle_config: |
34 | 34 | description: | |
35 | | - Checkstyle configuration specifies which ruleset to apply during scan. |
36 | | - There are two built-in configurations in checkstyle: [google_checks.xml, sun_checks.xml]. |
37 | | - google_checks.xml configures Checkstyle for the Google coding conventions (https://google.github.io/styleguide/javaguide.html) |
38 | | - sun_checks.xml configures Checkstyle for the Sun coding conventions (https://www.oracle.com/java/technologies/javase/codeconventions-contents.html) |
| 35 | + Checkstyle ruleset to apply during analysis. |
| 36 | + Built-in: google_checks.xml (Google Java Style), sun_checks.xml (Sun Code Conventions). |
| 37 | + Or provide path to custom config file relative to repository root. |
39 | 38 | default: "google_checks.xml" |
40 | 39 | checkstyle_version: |
41 | 40 | description: | |
42 | | - Checkstyle version to be used during analysis. |
43 | | - For a list of available version numbers go to [Checkstyle release page](https://github.com/checkstyle/checkstyle/releases/). |
44 | | - **IMPORTANT NOTE** |
45 | | - This field will always try to follow Checkstyle releases as close as possible and will use the latest available by default. |
46 | | - If it is not a default preference for your project, please, pin the needed version using this property. |
| 41 | + Checkstyle version to use for analysis. See https://github.com/checkstyle/checkstyle/releases/ |
| 42 | + Default: latest version (automatically updated). |
| 43 | + RECOMMENDED: Pin to a specific version in production to ensure consistent builds. |
47 | 44 | default: "" |
48 | 45 | properties_file: |
49 | 46 | description: | |
50 | | - Location of the properties file relative to the root directory. This file serves as a means to resolve repetitive or predefined values within the checkstyle configuration file. |
| 47 | + Path to properties file (relative to repository root) for defining variables in Checkstyle config. |
| 48 | + Use standard Java properties format (key=value) to centralize configuration values. |
51 | 49 | default: "" |
52 | 50 | runs: |
53 | 51 | using: "docker" |
|
0 commit comments