| token | Authentication token | no | ${{ github.token }} |
| build_dir | Directory containing the compile_commands.json file | no | . |
| base_dir | Absolute path to initial working directory. Useful if generating `compile_commands.json` outside of the Action | — | ${{ github.workspace }} |
| clang_tidy_version | Version of clang-tidy to use; one of 14, 17, 18, 19, 20, 21 | no | 21 |
| clang_tidy_checks | List of checks | no | -*,performance-*,readability-*,bugprone-*,clang-analyzer-*,cppcoreguidelines-*,mpi-*,misc-* |
| extra_arguments | Extra arguments to pass to the clang-tidy invocation | no | "" |
| config_file | Location of .clang-tidy config file. If specified, takes preference over `clang_tidy_checks` | no | "" |
| include | Comma-separated list of files or patterns to include | no | *.[ch],*.[ch]xx,*.[ch]pp,*.[ch]++,*.cc,*.hh |
| exclude | Comma-separated list of files or patterns to exclude | no | "" |
| apt_packages | Comma-separated list of apt packages to install | no | "" |
| install_commands | Commands to execute after `apt_packages` and before `cmake_command` | no | "" |
| cmake_command | If set, run CMake as part of the action using this command | no | "" |
| max_comments | Maximum number of comments to post at once | no | 25 |
| lgtm_comment_body | Message to post on PR if no issues are found. An empty string will post no LGTM comment. | no | clang-tidy review says "All clean, LGTM! :+1:" |
| split_workflow | Only generate but don't post the review, leaving it for the second workflow. Relevant when receiving PRs from forks that don't have the required permissions to post reviews. | no | false |
| annotations | Use annotations instead of comments. See README for limitations on annotations | no | false |
| parallel | Number of tidy instances to be run in parallel. Zero will automatically determine the right number. | no | 0 |
| include_context_lines | Include the 3 context lines above and below changes (default: false). This is useful when removing lines, as it allows `clang-tidy` to raise warnings on the context around deleted lines. Include the 3 context lines above and below changes. These can still be commented on in Github Reviews. | no | false |
| error_action | Action to take when encountering compile errors from Clang (clang-diagnostic-error). 'post' (default) will post the error as-is. 'skip' will ignore the error but post other errors. 'abort' will stop the action with an error if one is found. | no | post |
| pr | — | — | ${{ github.event.pull_request.number }} |
| repo | — | — | ${{ github.repository }} |