Skip to content

Commit 9572388

Browse files
Revert "[CI][format] Explicitly pass extensions to git-clang-format (#95794)"
This reverts commit 7620fe0. 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.
1 parent 371e924 commit 9572388

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

llvm/utils/git/code-format-helper.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -216,17 +216,6 @@ def format_run(self, changed_files: List[str], args: FormatArgs) -> Optional[str
216216
cf_cmd.append(args.start_rev)
217217
cf_cmd.append(args.end_rev)
218218

219-
# Gather the extension of all modified files and pass them explicitly to git-clang-format.
220-
# This prevents git-clang-format from applying its own filtering rules on top of ours.
221-
extensions = set()
222-
for file in cpp_files:
223-
_, ext = os.path.splitext(file)
224-
extensions.add(
225-
ext.strip(".")
226-
) # Exclude periods since git-clang-format takes extensions without them
227-
cf_cmd.append("--extensions")
228-
cf_cmd.append("'{}'".format(",".join(extensions)))
229-
230219
cf_cmd.append("--")
231220
cf_cmd += cpp_files
232221

0 commit comments

Comments
 (0)