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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user