mirror of
https://github.com/curl/curl.git
synced 2026-05-15 04:16:21 +03:00
spacecheck.pl: when detecting unicode, mention line number
Closes #18120
This commit is contained in:
parent
902262b166
commit
e688fe18a9
1 changed files with 7 additions and 1 deletions
8
.github/scripts/spacecheck.pl
vendored
8
.github/scripts/spacecheck.pl
vendored
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue