Enforce clang-format 20 and commentflow in CI
CI accepted any clang-format version and had no check on comment width, so formatting depended on who ran it. This pins clang-format to major version 20 and adds a commentflow gate (modeled on elfuse) that reflows comments to the column limit read from .clang-format. The existing comments were reflowed once; where the tool merged adjacent comments that were separate on purpose, I rewrote them as one comment with a blank line between paragraphs. The workflow also moves to actions/checkout@v7 on ubuntu-24.04, drops token permissions to read, cancels superseded PR runs, and adds a Dependabot config for the actions.
Left as is: commentflow is installed from its rolling latest release with the sha256 GitHub records for the asset, because upstream publishes no other tag. A new commentflow release can therefore change the reflow rules under an unchanged commit.
Summary by cubic
Pins CI to clang-format 20 and adds a commentflow gate so formatting and comment width no longer depend on which machine ran the checks.
- The format gate now requires clang-format major version 20, with the workflow installing the pinned
20.1.8so the formatter cannot drift under an unchanged commit; git or diff failures are errors, not passes. - Adds a commentflow check that reflows comments to the 80-column limit read from
.clang-format, and reflows the existing comments once; comments the tool would merge are written as one comment with a blank line between paragraphs. - File lists in both check scripts are gathered NUL-delimited, so a failing git is an error and odd filenames stay one path; tracked files deleted from the worktree are skipped.
- Moves the workflow to
actions/checkout@v7on ubuntu-24.04, limits token permissions to read, cancels superseded pull request runs, and adds Dependabot for the actions. commentflowis installed from its rolling latest release with the sha256 taken from the GitHub API, so a new release could change the reflow rules without a commit change.