mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:01:41 +03:00
parent
ed7bf43a08
commit
d4a06862cb
1 changed files with 17 additions and 17 deletions
|
|
@ -148,24 +148,24 @@ while(my $filename = <$git_ls_files>) {
|
|||
push @err, "content: has multiple EOL at EOF";
|
||||
}
|
||||
|
||||
if(!fn_match($filename, @double_empty_lines)) {
|
||||
if($content =~ /\n\n\n/ ||
|
||||
$content =~ /\r\n\r\n\r\n/) {
|
||||
my $line = 0;
|
||||
my $blank = 0;
|
||||
for my $l (split(/\n/, $content)) {
|
||||
chomp $l;
|
||||
$line++;
|
||||
if($l =~ /^$/) {
|
||||
if($blank) {
|
||||
my $lineno = sprintf("duplicate empty line @ line %d", $line);
|
||||
push @err, $lineno;
|
||||
}
|
||||
$blank = 1;
|
||||
}
|
||||
else {
|
||||
$blank = 0;
|
||||
if((!fn_match($filename, @double_empty_lines) &&
|
||||
($content =~ /\n\n\n/ ||
|
||||
$content =~ /\r\n\r\n\r\n/)) ||
|
||||
$content =~ />\n\n\n+[<#]/) {
|
||||
my $line = 0;
|
||||
my $blank = 0;
|
||||
for my $l (split(/\n/, $content)) {
|
||||
chomp $l;
|
||||
$line++;
|
||||
if($l =~ /^$/) {
|
||||
if($blank) {
|
||||
my $lineno = sprintf("duplicate empty line @ line %d", $line);
|
||||
push @err, $lineno;
|
||||
}
|
||||
$blank = 1;
|
||||
}
|
||||
else {
|
||||
$blank = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue