[llvm] 9572388 - Revert "[CI][format] Explicitly pass extensions to git-clang-format (#95794)"
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 28 15:53:11 PDT 2024
Author: Aiden Grossman
Date: 2024-06-28T22:52:29Z
New Revision: 9572388a849c494d45df334f9facd8ee6663953f
URL: https://github.com/llvm/llvm-project/commit/9572388a849c494d45df334f9facd8ee6663953f
DIFF: https://github.com/llvm/llvm-project/commit/9572388a849c494d45df334f9facd8ee6663953f.diff
LOG: Revert "[CI][format] Explicitly pass extensions to git-clang-format (#95794)"
This reverts commit 7620fe0d2d1e0257611c0ab0d96f3bf1bf7a1079.
This patch was causing some significant portion of code formatting jobs
to succeed when they should have failed. More investigation is needed.
Tracked in #97060.
Added:
Modified:
llvm/utils/git/code-format-helper.py
Removed:
################################################################################
diff --git a/llvm/utils/git/code-format-helper.py b/llvm/utils/git/code-format-helper.py
index d60d4131bc94b..f1207026704e8 100755
--- a/llvm/utils/git/code-format-helper.py
+++ b/llvm/utils/git/code-format-helper.py
@@ -216,17 +216,6 @@ def format_run(self, changed_files: List[str], args: FormatArgs) -> Optional[str
cf_cmd.append(args.start_rev)
cf_cmd.append(args.end_rev)
- # 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
- cf_cmd.append("--extensions")
- cf_cmd.append("'{}'".format(",".join(extensions)))
-
cf_cmd.append("--")
cf_cmd += cpp_files
More information about the llvm-commits
mailing list