Merge pull request #15767 from miri64/dist/fix/uncrustify-file

uncrustify: use unified diff to generate GH annotation
This commit is contained in:
Martine Lenders 2021-01-14 13:00:20 +01:00 committed by GitHub
commit 42c1070387
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,8 @@ exec_uncrustify () {
if echo "$line" | grep -q '^--- .\+$'; then
_annotate_diff "$DIFFFILE" "$DIFFLINE" "$DIFF"
DIFF="$line"
DIFFFILE=$(echo "$line" | sed 's/^--- \(.\+\)$/\1/g')
DIFFFILE=$(echo "$line" |
sed 's#^--- \([ab]/\)\?\(.\+\)$#\2#g')
DIFFLINE=""
# we are in a diff currently
elif [ -n "$DIFF" ]; then