spacecheck: double spaces in folded strings, fix fallouts

Closes #20695
This commit is contained in:
Viktor Szakats 2026-02-23 22:12:03 +01:00
parent 65262be0ab
commit 453470fab1
No known key found for this signature in database
5 changed files with 15 additions and 5 deletions

View file

@ -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";
}