[clang-tools-extra] [llvm] [WIP] Formatting suggestions in CI (PR #158779)
Victor Chernyakin via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 15 22:57:21 PDT 2025
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/158779
>From f77b63dc50a4257a36319f5a85f64068896ccfd8 Mon Sep 17 00:00:00 2001
From: Victor Chernyakin <chernyakin.victor.j at outlook.com>
Date: Mon, 15 Sep 2025 22:31:15 -0700
Subject: [PATCH] [WIP] Formatting suggestions in CI
---
.github/workflows/pr-code-format.yml | 7 +++++++
clang-tools-extra/clang-tidy/ClangTidy.cpp | 7 +++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml
index 9396bf019e1ac..9364fce00cfe6 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,8 @@ jobs:
name: workflow-args
path: |
comments
+
+ - uses: parkerbxyz/suggest-changes at 00f556dcc0c9454336b598b8872fdc11d77984d9 #v3.0.0
+ 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;
}
More information about the llvm-commits
mailing list