[llvm] [CI][format] Explicitly pass extensions to git-clang-format (PR #95794)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 07:27:38 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r 57b8be463a937e5acee025f4cccdfd4ac6b73ec9...44bbb0e3718302f61064948efb401988cb9df615 llvm/utils/git/code-format-helper.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- code-format-helper.py	2024-06-17 14:24:15.000000 +0000
+++ code-format-helper.py	2024-06-17 14:27:13.916592 +0000
@@ -219,11 +219,13 @@
         # Gather the extension of all modified files and pass them explicitly to git-clang-format.
         # This prevents git-clang-format from applying its own filtering rules on top of ours.
         extensions = set()
         for file in cpp_files:
             _, ext = os.path.splitext(file)
-            extensions.add(ext.strip(".")) # Exclude periods since git-clang-format takes extensions without them
+            extensions.add(
+                ext.strip(".")
+            )  # Exclude periods since git-clang-format takes extensions without them
         cf_cmd.append("--extensions")
         cf_cmd.append("'{}'".format(",".join(extensions)))
 
         cf_cmd.append("--")
         cf_cmd += cpp_files

``````````

</details>


https://github.com/llvm/llvm-project/pull/95794


More information about the llvm-commits mailing list