Skip to content

Moving toward v3 #283

Open
Open

Description

@2bndy5

This is a checklist of tasks that should be implemented in v3. Work for this shall live in the v3 branch until ready for deployment.

  • switch to cpp-linter-rs project. We could use a standalone binary instead of the python binding, but dependabot would not know what version is used. Alternatively, we could use the node.js binding, but packaging that in cpp-linter-action needs further investigation (because of native distributions on npmjs.org).
  • switch clang-tools installer to non-python dependent project. I have written clang-tools-manager which does exactly what cpp-linter-action and clang-tools-pip does. And it is built into cpp-linter-rs, so
    1. there's no additional executable binary needed.
    2. The platform-specific steps in cpp-linter-action about installing clang tools are not needed.
    3. A clang tool is only installed (after file detection/filtering) if it is needed.
  • Write a migration guide for v2 -> v3 and v1 -> v3. This should include changes to inputs only. Users can find information about outputs in our regular documentation because there are no breaking changes in the outputs.

Backward compatibility

We can retain v2 in a non-default branch (named v2). This would allow current workflows to keep working with

- uses: cpp-linter/cpp-linter-action@v2

Dependabot updates will not update non-default branches, but that's ok. The cpp-linter-rs project will begin uploading releases to pypi, so the cpp-linter version on v2 branch should be pinned to the last pure-python release.

Activity

  1. added
    enhancementNew feature or request
    semver:majorOverrides the PR title: bump the major version
    help wantedExtra attention is needed
    on Nov 27, 2024
  2. shenxianpeng commented on Oct 31, 2026

    @shenxianpeng
    Member

    I read through the updated v3.0.0-rc0 branch (e8ce711) before setting up an end-to-end run in test-cpp-linter-action. Three things I think will show up there:

    1. Every run fails on --jobs. The branch pins cpp-linter==2.0.0rc23 from TestPyPI, which was built before #536 (cpp-linter-rs), so it rejects --jobs. The action always passes --jobs=${{ inputs.jobs }}. Running rc23 locally with --jobs=0 gives error: unexpected argument '--jobs'. A Python rc built from current main should fix it, or the action could stop passing --jobs since it is ignored anyway.
    2. auto-fix never commits. v2 leaves the worktree untouched, so git ls-files --modified returns nothing and git apply is never reached. Also, extra arguments to git apply are read as more patch files, not as paths to limit the patch to. Maybe something like git apply --include=<pathspec> $FIX_PATCH_PATH, then list what changed?
    3. tidy-review / format-review don't take effect. pr_review is computed from all three inputs but not used; the args still use --pr-review=($env.INPUT_PR_REVIEW).

    Once there is a Python rc with #536–#541, I'm happy to run the full e2e (PR review, thread comment, step summary, SARIF, auto-fix on Linux/macOS/Windows) and post the results here.

  3. 2bndy5 commented on Oct 31, 2026

    @2bndy5
    CollaboratorAuthor
    1. yeah, that was an oversight when rebasing this branch onto main (which had all the INPUTS_* env changes). I can do another release crusade in the cpp-linter-rs repo, then bump this branch accordingly.
    2. I missed the git ls-files --modified command; that should be removed.
    3. This was intentional. It doesn't make sense to pass --tidy-review, --format-review, and --pr-review when --pr-review replaces the other two. I checked locally, and clap does not allow specifying the same arg 3 times:
      cpp-linter --pr-review --tidy-review --format-review
      error: the argument '--pr-review [<PR_REVIEW>]' cannot be used multiple times
      I'm not sure there is a good way around that. I have to investigate (see what's available in clap API). I added the aliases for backward compatibility, but I hadn't considered the case where multiple aliases are passed.
  4. shenxianpeng commented on Nov 3, 2026

    @shenxianpeng
    Member

    Thanks for the rc.25 release crusade! When you have time, could you bump the v3.0.0-rc0 branch to it? The branch is still on e8ce711, which pins cpp-linter==2.0.0rc23, so every run still fails on --jobs. The two items from above would go in the same update:

    • pin cpp-linter==2.0.0rc24 (the Python package of rc.25, on TestPyPI)
    • remove the git ls-files --modified step

    Meanwhile I'll run the end-to-end tests in test-cpp-linter-action against rc.25 (PR review, thread comment, step summary, SARIF, auto-fix patch on Linux, macOS and Windows) and post the results here, so we know what's left before GA.

  5. 2bndy5 commented on Nov 3, 2026

    @2bndy5
    CollaboratorAuthor

    v3.0.0-rc0 branch now on latest v2 rc release. I also removed the --modified flag from git ls-files command.

  6. shenxianpeng commented on Nov 5, 2026

    @shenxianpeng
    Member

    Thanks for the update! I ran v3.0.0-rc0 @ 34d5522 (cpp-linter rc24 / rc.25) end to end in cpp-linter/test-cpp-linter-action#69.

    Works: with the workaround below, the v3 counts match v2 exactly on ubuntu x64/arm64, macOS and windows x64 (clang 21: 14 total, 15 on Windows), and windows-11-arm works too. clang 12/17/23 run fine. jobs now only prints the deprecation warning. The PR review, thread comment, step summary and summary-output-file all work.

    Three things still break:

    1. Every run fails unless summary-output-file is set. The action always passes --summary-output-file= and --database=, and rc.25 rejects an empty path:
      error: a value is required for '--summary-output-file <PATH>' but none was supplied (log). Once that's set, an unset database fails the same way. Since summary-output-file is empty by default, every default workflow fails. Either pass these options only when they're set (database, summary-output-file, probably extra-args), or make cpp-linter treat an empty value as unset.
    2. auto-fix fails at git apply. git apply $env.FIX_PATCH_PATH ...$modified treats every source file after the patch as another patch: error: No valid patches in input, exit 128 (log). Running ^git apply $env.FIX_PATCH_PATH on its own before the git ls-files line fixes it.
    3. tidy-review: true alone gives no review. $pr_review combines the three inputs but is never used: the action still passes --pr-review=($env.INPUT_PR_REVIEW). With rs#547 cpp-linter accepts the combination, so --pr-review=($pr_review) should do it. (Only if you want the deprecated aliases to keep working in v3.)

    Minor, in cpp-linter-rs: on ubuntu the log says [ERROR]: Failed to install clang-tidy-21 via apt: followed by Successfully installed. It looks like apt's "does not have a stable CLI interface" warning on stderr gets logged as an error.

    The matrix job ran with summary-output-file set everywhere as a workaround; without it every job failed at item 1.


    Generated by Claude Code

  7. 2bndy5 commented on Nov 6, 2026

    @2bndy5
    CollaboratorAuthor

    ok, I updated the branch again.

    1. summary-output-file and database are conditionally passed if the value given is not empty.
    2. git apply is done before git ls-files I added back the --modified arg to better filter files in git add
    3. switched the --pr-review value to the combined $pr_review arg in the nu script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededsemver:majorOverrides the PR title: bump the major version

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions