spacecheck: warn for 3+ empty lines in a row, fix fallouts

Closes #18478
This commit is contained in:
Viktor Szakats 2025-09-04 15:25:27 +02:00
parent 5fa4fb0c13
commit ec9cb618a0
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
14 changed files with 5 additions and 26 deletions

View file

@ -151,6 +151,11 @@ while(my $filename = <$git_ls_files>) {
push @err, "content: has multiple EOL at EOF";
}
if($content =~ /\n\n\n\n/ ||
$content =~ /\r\n\r\n\r\n\r\n/) {
push @err, "content: has 3 or more consecutive empty lines";
}
if($content =~ /([\x00-\x08\x0b\x0c\x0e-\x1f\x7f])/) {
push @err, "content: has binary contents";
}