1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

Also report the previous line when going backwards in time.

This is because half of the time, the previous line is the one that is
wrong, so you get redirected to line X, where X-1 has the error, and you
wonder because line X looks just fine.

Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2018-07-02 16:19:50 +00:00
parent 76a65ee47f
commit 5b4fcd0676
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=473752

View File

@ -82,7 +82,9 @@ $3 !~ /^20[0-3][0-9]-[01][0-9]-[0-3][0-9]$/ {
srcs[$1] = 1
if (lastdate > $3) {
printf "%5d: date going backwards from %s to %s\n", NR, lastdate, $3 | sort
printf "%5d: date going backwards from %s to %s from this line\n", NR-1, lastdate, $3 | sort
error[NR-1] = 1
printf "%5d: date going backwards from %s to %s to this line\n", NR, lastdate, $3 | sort
error[NR] = 1
}
lastdate = $3