Skip to content

feat: v3 defaults, sarif-file and strict inputs, and a migration guide - #543

Open
shenxianpeng wants to merge 4 commits into
v3.0.0-rc0from
claude/project-thread-r495nc
Open

shenxianpeng wants to merge 4 commits into
v3.0.0-rc0from
claude/project-thread-r495nc

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Closes the remaining input work in #283 before v3.0.0. Four commits, so each can be reviewed on its own.

version defaults to latest: the newest major version cpp-linter can install, 23 with cpp-linter 2.0.

New defaults:

Input v2 v3
style llvm file
tidy-checks fixed list of check groups '' (the repository's .clang-tidy files)
lines-changed-only false true
step-summary false true
thread-comments false update on pull_request events, false on all other events

The first four are the ones agreed in #283. thread-comments is new to this discussion. The reason is the comment noise users report with true: update keeps one comment per PR and edits it in place. It is off on push events, so a failing push doesn't post a commit comment. Without pull-requests: write, the step logs a warning and still passes. @2bndy5, does that default work for you?

New inputs:

  • sarif-file passes --sarif-file through. A new "GitHub code scanning" recipe uploads the file with github/codeql-action/upload-sarif.
  • strict passes --strict through: the step fails when checks fail, and the outputs are still set. It defaults to false until we settle the default in Moving toward v3 #283.

Docs: docs/migration.md covers v2 to v3, plus notes for v1. It lists every renamed input, deprecated input and changed default, and how to keep the v2 behavior. pr-review was missing from docs/action.yml, so it's added there too.

Testing:

  • mkdocs build --strict passes.
  • I ran the composite step locally with nu 0.106.1 and cpp-linter 2.0.0rc27:
    • strict: true exits 1 with all three outputs set.
    • strict: true with no files passes.
    • sarif-file writes SARIF 2.1.0 (9 results, 7 rules on the test repo), and an empty run writes an empty file.
    • The new style and tidy-checks defaults pick up the repository's .clang-format and .clang-tidy.
  • End-to-end in test-cpp-linter-action (run 45801055704, branch claude/project-thread-r495nc), on ubuntu, windows and macos:
    • Defaults with only GITHUB_TOKEN: style: file, and lines-changed-only: true lints only the changed file. No commit comment on the push.
    • strict: unset passes; true fails with the outputs set; true with no files passes.
    • sarif-file writes SARIF 2.1.0 on all three OSes, and upload-sarif accepts it on ubuntu.
    • Two macOS steps failed with Primary Rate Limit exceeded. Both are test steps that run without GITHUB_TOKEN, so they hit the anonymous API limit. The same steps pass on ubuntu and windows.

v3 installs the clang tools itself, so the default can follow the newest
major version that cpp-linter can install (cpp-linter-rs#599) instead of a
fixed 21.
List the renamed, deprecated and changed-default inputs, the new tool
installation and auto-fix behavior, and the notes for v1 users. Also
document `pr-review` on the inputs page, which was missing.
Pass cpp-linter's --sarif-file and --strict through, document both, and add a
GitHub code scanning recipe. strict defaults to false until its v3 default is decided.
style: file, tidy-checks: '', lines-changed-only: true, step-summary: true, and
thread-comments: update on pull_request events (false otherwise). The migration
guide lists each change and how to keep the v2 behavior.
@shenxianpeng
shenxianpeng requested a review from a team as a code owner November 26, 2026 10:23
@shenxianpeng
shenxianpeng requested a review from 2bndy5 November 26, 2026 10:23
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 26, 2026
@shenxianpeng shenxianpeng self-assigned this Nov 26, 2026
@2bndy5

2bndy5 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

The thread-comments new default is fine with me. I recently saw a setting that disables comments for commits; I didn't know that was configurable.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants