Repository navigation
feat: v3 defaults, sarif-file and strict inputs, and a migration guide - #543
Open
shenxianpeng wants to merge 4 commits into
Open
shenxianpeng wants to merge 4 commits into
shenxianpeng wants to merge 4 commits into
Conversation
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.
Collaborator
|
The |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the remaining input work in #283 before v3.0.0. Four commits, so each can be reviewed on its own.
versiondefaults tolatest: the newest major version cpp-linter can install, 23 with cpp-linter 2.0.New defaults:
stylellvmfiletidy-checks''(the repository's.clang-tidyfiles)lines-changed-onlyfalsetruestep-summaryfalsetruethread-commentsfalseupdateonpull_requestevents,falseon all other eventsThe first four are the ones agreed in #283.
thread-commentsis new to this discussion. The reason is the comment noise users report withtrue:updatekeeps 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. Withoutpull-requests: write, the step logs a warning and still passes. @2bndy5, does that default work for you?New inputs:
sarif-filepasses--sarif-filethrough. A new "GitHub code scanning" recipe uploads the file withgithub/codeql-action/upload-sarif.strictpasses--strictthrough: the step fails when checks fail, and the outputs are still set. It defaults tofalseuntil we settle the default in Moving toward v3 #283.Docs:
docs/migration.mdcovers 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-reviewwas missing fromdocs/action.yml, so it's added there too.Testing:
mkdocs build --strictpasses.strict: trueexits 1 with all three outputs set.strict: truewith no files passes.sarif-filewrites SARIF 2.1.0 (9 results, 7 rules on the test repo), and an empty run writes an empty file.styleandtidy-checksdefaults pick up the repository's.clang-formatand.clang-tidy.claude/project-thread-r495nc), on ubuntu, windows and macos:GITHUB_TOKEN:style: file, andlines-changed-only: truelints only the changed file. No commit comment on the push.strict: unset passes;truefails with the outputs set;truewith no files passes.sarif-filewrites SARIF 2.1.0 on all three OSes, andupload-sarifaccepts it on ubuntu.Primary Rate Limit exceeded. Both are test steps that run withoutGITHUB_TOKEN, so they hit the anonymous API limit. The same steps pass on ubuntu and windows.