mirror of
https://github.com/curl/curl.git
synced 2026-08-24 21:33:31 +03:00
spacecheck: double spaces in folded strings, fix fallouts
Closes #20695
This commit is contained in:
parent
65262be0ab
commit
453470fab1
5 changed files with 15 additions and 5 deletions
|
|
@ -170,6 +170,16 @@ while(my $filename = <$git_ls_files>) {
|
|||
}
|
||||
}
|
||||
|
||||
my $search = $content;
|
||||
my $linepos = 0;
|
||||
while($search =~ / "\n *" /) {
|
||||
my $part = substr($search, 0, $+[0]);
|
||||
$search = substr($search, $+[0]);
|
||||
my $line = ($part =~ tr/\n//);
|
||||
push @err, sprintf("line %d: double spaces in folded string", $linepos + $line);
|
||||
$linepos += $line;
|
||||
}
|
||||
|
||||
if($content =~ /([\x00-\x08\x0b\x0c\x0e-\x1f\x7f])/) {
|
||||
push @err, "content: has binary contents";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue