[clang-tools-extra] [llvm] [WIP] Formatting suggestions in CI (PR #158779)
Victor Chernyakin via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 15 22:54:25 PDT 2025
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/158779
>From 10fcc7b2653247142c44365bf3d9ff7c8a35f40b 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 | 2 ++
clang-tools-extra/clang-tidy/ClangTidy.cpp | 7 +++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml
index 9396bf019e1ac..6afe8c882eaac 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 }}
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 cfe-commits
mailing list