https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/158779
>From efd515aeaa7004fb74844145b36f6a9febb8d5e5 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin <chernyakin.victo...@outlook.com> Date: Mon, 15 Sep 2025 22:31:15 -0700 Subject: [PATCH] [WIP] Formatting suggestions in CI --- .github/workflows/pr-code-format.yml | 8 ++++++++ clang-tools-extra/clang-tidy/ClangTidy.cpp | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml index 9396bf019e1ac..607b6cf3bdfb0 100644 --- a/.github/workflows/pr-code-format.yml +++ b/.github/workflows/pr-code-format.yml @@ -2,6 +2,7 @@ name: "Check code formatting" permissions: contents: read + pull-requests: write on: pull_request: @@ -71,6 +72,7 @@ jobs: run: pip install -r code-format-tools/llvm/utils/git/requirements_formatting.txt - name: Run code formatter + id: run-code-formatter env: GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }} CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} @@ -91,3 +93,9 @@ jobs: name: workflow-args path: | comments + + - uses: parkerbxyz/suggest-changes@00f556dcc0c9454336b598b8872fdc11d77984d9 #v3.0.0 + if: steps.run-code-formatter.outcome == "failure" + with: + comment: "Formatting can be fixed by applying the following changes:" + event: "REQUEST_CHANGES" diff --git a/clang-tools-extra/clang-tidy/ClangTidy.cpp b/clang-tools-extra/clang-tidy/ClangTidy.cpp index 4c36bbccf44d9..ca50e9bffd591 100644 --- a/clang-tools-extra/clang-tidy/ClangTidy.cpp +++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp @@ -491,8 +491,11 @@ std::vector<std::string> ClangTidyASTConsumerFactory::getCheckNames() { ClangTidyOptions::OptionMap ClangTidyASTConsumerFactory::getCheckOptions() { ClangTidyOptions::OptionMap Options; std::vector<std::unique_ptr<ClangTidyCheck>> Checks = - CheckFactories->createChecks(&Context); - for (const auto &Check : Checks) + CheckFactories->createChecks + (&Context); + for (const + + auto &Check : Checks) Check->storeOptions(Options); return Options; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits