djoezeke/clang-format-action

Run clang-format diagnostics, optionally apply fixes, and publish review feedback on pull requests.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
github_tokenToken used to push the fix branch and create or update a pull request.yes
clang_format_pathPath to the clang-format executable.noclang-format
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
format_fileApply clang-format fixes in place (`-i`) for each analyzed file.notrue
create_pull_requestCreate or update a pull request when formatting changes were applied.notrue
base_branchBase branch for the pull request. Defaults to the repository default branch.no""
branch_prefixPrefix for the generated fix branch.noclang-format/auto-fix
commit_messageCommit message used when fixes are committed.nochore: apply clang-format fixes
pr_titleTitle for the pull request.noApply clang-format fixes
pr_bodyOptional extra text appended to the generated pull request body.no""
thread_commentsLeave an issue-thread report comment 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
format_reviewCreate a pull request review when clang-format diagnostics are found.notrue
review_eventReview event for pull request reviews. Options `comment` or `request_changes`.nocomment
file_annotationsCreate GitHub file annotations for reported diagnostics.notrue
fail_on_diagnosticsLegacy fail policy. When true, fail if any diagnostics are found.nofalse
max_commentsMaximum inline review comments to post (0 = unlimited).no0
suppress_warningsSuppress clang-format warning-level diagnostics.nofalse
max_diagnosticsMaximum diagnostics included in review/annotation/report surfaces (0 = unlimited).no0
fail_onFailure policy. Options `none`, `error`, or `all`.nonone
namedescription
changedWhether files were modified.
diagnosticsNumber of clang-format 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.