Revert "[CI][format] Explicitly pass extensions to git-clang-format (#95794)"

This reverts commit 7620fe0d2d.

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.
This commit is contained in:
Aiden Grossman
2024-06-28 22:52:29 +00:00
parent 371e924605
commit 9572388a84

View File

@@ -216,17 +216,6 @@ class ClangFormatHelper(FormatHelper):
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