Skip to content

Conversation

vbvictor
Copy link
Contributor

@vbvictor vbvictor commented Sep 22, 2025

Testing ground do not review!

@vbvictor vbvictor marked this pull request as draft September 22, 2025 20:24
@llvmbot
Copy link
Member

llvmbot commented Sep 22, 2025

@llvm/pr-subscribers-github-workflow

Author: Baranov Victor (vbvictor)

Changes

WIP, do not review


Full diff: https://github.com/llvm/llvm-project/pull/160193.diff

1 Files Affected:

  • (modified) .github/workflows/pr-code-lint.yml (+4-1)
diff --git a/.github/workflows/pr-code-lint.yml b/.github/workflows/pr-code-lint.yml
index bc70933147bd2..3efd75471a317 100644
--- a/.github/workflows/pr-code-lint.yml
+++ b/.github/workflows/pr-code-lint.yml
@@ -47,10 +47,13 @@ jobs:
           echo "Changed files:"
           echo "$CHANGED_FILES"
 
+      # The clang tidy version should always be upgraded to the first version
+      # of a release cycle (x.1.0) or the last version of a release cycle, or
+      # if there have been relevant clang-format backports.
       - name: Install clang-tidy
         uses: aminya/setup-cpp@17c11551771948abc5752bbf3183482567c7caf0 # v1.1.1
         with:
-          clang-tidy: 20.1.8
+          clang-tidy: 21.1.0
       
       - name: Setup Python env
         uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0

Copy link

github-actions bot commented Sep 23, 2025

✅ With the latest revision this PR passed the C/C++ code linter.

Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff origin/main HEAD --extensions cpp -- clang-tools-extra/clang-tidy/ClangTidy.cpp

⚠️
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing origin/main to the base branch/commit you want to compare against.
⚠️

View the diff from clang-format here.
diff --git a/clang-tools-extra/clang-tidy/ClangTidy.cpp b/clang-tools-extra/clang-tidy/ClangTidy.cpp
index 385c7adc6..7e18f3806 100644
--- a/clang-tools-extra/clang-tidy/ClangTidy.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp
@@ -270,7 +270,8 @@ private:
                  const llvm::StringMap<Replacements> &Fix) {
     for (const auto &FileAndReplacements : Fix) {
       for (const auto &Repl : FileAndReplacements.second) {
-        if (!Repl.isApplicable()) continue;
+        if (!Repl.isApplicable())
+          continue;
         FileByteRange FBR;
         FBR.FilePath = Repl.getFilePath().str();
         FBR.FileOffset = Repl.getOffset();

@vbvictor vbvictor changed the title [GitHub] Bump clang-tidy version to 21th in CI [GitHub][WIP] Run clang-format inside ci-container Sep 28, 2025
Copy link

github-actions bot commented Sep 28, 2025

⚠️ Python code formatter, darker found issues in your code. ⚠️

You can test this locally with the following command:
darker --check --diff -r origin/main...HEAD llvm/utils/git/code-lint-helper.py

⚠️
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing origin/main to the base branch/commit you want to compare against.
⚠️

View the diff from darker here.
--- code-lint-helper.py	2025-09-28 11:26:33.000000 +0000
+++ code-lint-helper.py	2025-09-28 11:28:31.390526 +0000
@@ -204,12 +204,14 @@
         print(f"Running clang-tidy-diff: {' '.join(tidy_diff_cmd)}")
 
     proc = subprocess.run(
         tidy_diff_cmd,
         input=diff_content,
-                stdout=subprocess.PIPE, stderr=subprocess.PIPE,
-        text=True, check=False,
+        stdout=subprocess.PIPE,
+        stderr=subprocess.PIPE,
+        text=True,
+        check=False,
     )
 
     return clean_clang_tidy_output(proc.stdout.strip())
 
 

@boomanaiden154
Copy link
Contributor

This is just a duplicate of #161073?

@vbvictor
Copy link
Contributor Author

This is just a duplicate of #161073?

Yes, I'm testing how everything works here

@vbvictor vbvictor changed the title [GitHub][WIP] Run clang-format inside ci-container [TEST][WIP] Run clang-format inside ci-container Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants