From: Daniel Stenberg Date: Thu, 31 Jul 2025 15:10:12 +0000 (+0200) Subject: spacecheck.pl: when detecting unicode, mention line number X-Git-Tag: curl-8_16_0~298 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e688fe18a9fb4ae54ed6c0feca5786e98e283818;p=thirdparty%2Fcurl.git spacecheck.pl: when detecting unicode, mention line number Closes #18120 --- diff --git a/.github/scripts/spacecheck.pl b/.github/scripts/spacecheck.pl index 10bd2fc8ed..a50b260bf5 100755 --- a/.github/scripts/spacecheck.pl +++ b/.github/scripts/spacecheck.pl @@ -167,7 +167,13 @@ while(my $filename = <$git_ls_files>) { for my $e (split(//, $non)) { $hex .= sprintf("%s%02x", $hex ? " ": "", ord($e)); } - push @err, "content: has non-ASCII: '$non' ($hex)"; + my $line; + for my $l (split(/\n/, $content)) { + $line++; + if($l =~ /([\x80-\xff]+)/) { + push @err, "line $line: has non-ASCII: '$non' ($hex)"; + } + } } if(@err) {