djoezeke/clang-tidy-action

Run clang-tidy across tracked source files, collect diagnostics, and optionally create fix branches, pull requests, and inline reviews.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Apr 4, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: djoezeke/clang-tidy-action@f773fc8f195b0706f618614c4c578105609b9d56 # no releases — HEAD as of 2026-07-11

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
github_tokenToken used to push the fix branch and create or update a pull request.yes
clang_tidy_pathPath to the clang-tidy executable.noclang-tidy
build_directoryDirectory containing compile_commands.json when using a compilation database.nobuild
compile_commands_pathExplicit path to compile_commands.json or to its containing directory.no""
checksclang-tidy checks to enable.noclang-analyzer-*,bugprone-*,modernize-*,performance-*,readability-*
source_extensionsComma-separated list of source file extensions to analyze.no.c,.cc,.cpp,.cxx,.m,.mm,.h,.hh,.hpp,.hxx
exclude_pathsComma-separated list of path fragments to ignore.no.git,node_modules,build
apply_fixesApply safe clang-tidy fixes to files.notrue
create_pull_requestCreate or update a pull request with the fixes.notrue
base_branchBase branch for the pull request. Defaults to the repository default branch.no""
branch_prefixPrefix for the generated fix branch.noclang-tidy/auto-fix
commit_messageCommit message used when fixes are committed.nochore: apply clang-tidy fixes
pr_titleTitle for the pull request.noApply clang-tidy fixes
pr_bodyOptional extra text appended to the generated pull request body.no""
thread_commentsLeave thread comments on the pull request. Options 'update', 'create', or 'off'.noupdate
analysis_scopeScope of analysis. Use 'all' for all tracked files or 'changed' for files changed in the PR.noall
tidy_reviewCreate a PR review when clang-tidy issues are found.notrue
review_eventReview event when posting PR review. Options 'comment' or 'request_changes'.nocomment
file_annotationsCreate GitHub file annotations for clang-tidy issues.notrue
fail_on_diagnosticsFail the action if clang-tidy finds any issues.nofalse
max_commentsMaximum number of comments to post (0 = unlimited).no0
suppress_warningsSuppress clang-tidy warning-level diagnostics.nofalse
max_diagnosticsMaximum number of diagnostics used for review comments, annotations, and report output (0 = unlimited).no0
fail_onFailure policy. Options 'none' (never fail), 'error' (fail on errors), or 'all' (fail on any warning/error).nonone
namedescription
changedWhether files were modified.
diagnosticsNumber of clang-tidy diagnostics collected.
diagnostics_reportedNumber of diagnostics included in report/review output after limits and suppression.
diagnostics_warningsNumber of warning-level diagnostics.
diagnostics_errorsNumber of error-level diagnostics.
branchName of the generated branch.
pull_request_urlURL of the created or updated pull request.
review_idID of the created PR review.
report_pathPath to the generated markdown report.