Skip to content

Commit

Permalink
Merge pull request #15749 from miri64/dist/fix/headerguards-multi-patch
Browse files Browse the repository at this point in the history
dist/tools/headerguards: fix annotation for multiple patches per file
  • Loading branch information
miri64 committed Jan 12, 2021
2 parents acd8466 + b711515 commit d5ec849
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dist/tools/headerguards/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ _headercheck() {
if echo "$line" | \
grep -q "@@ -[0-9]\+\(,[0-9]\+\)\? +[0-9]\+\(,[0-9]\+\)\? @@"
then
# treat hunk as new diff so it is at the corresponding line
if [ -n "${DIFFLINE}" ]; then
_annotate_diff "$DIFFFILE" "$DIFFLINE" "$DIFF"
DIFF="--- $DIFFFILE\n+++ $DIFFFILE"
fi
DIFFLINE="$(echo "$line" | sed 's/@@ -\([0-9]\+\).*$/\1/')"
fi
DIFF="$DIFF\n$line"
Expand Down

0 comments on commit d5ec849

Please sign in to comment.