Merge pull request #46050 from akien-mga/ci-simplify-file_format

CI: Remove file_format.sh changes hard to reproduce on Windows
This commit is contained in:
Rémi Verschelde 2021-02-17 13:10:27 +01:00 committed by GitHub
commit 1efb4ee6b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,15 +38,6 @@ while IFS= read -rd '' f; do
# Remove trailing space characters and ensures that files end # Remove trailing space characters and ensures that files end
# with newline characters. -l option handles newlines conveniently. # with newline characters. -l option handles newlines conveniently.
perl -i -ple 's/\s*$//g' "$f" perl -i -ple 's/\s*$//g' "$f"
# Remove the character sequence "== true" if it has a leading space.
perl -i -pe 's/\x20== true//g' "$f"
if [[ $(uname) == "Linux" ]] && [[ "$f" != *"xml" ]]; then
# Remove empty lines after the opening brace of indented blocks.
sed -z -i 's/\x7B\x0A\x0A\x09/\x7B\x0A\x09/g' "$f"
# Remove empty lines before the closing brace (in some cases).
sed -z -i 's/\x0A\x0A\x7D/\x0A\x7D/g' "$f"
fi
done done
git diff > patch.patch git diff > patch.patch