spacecheck.pl: fix to check 3+ newlines in all files
No binary (build failed)
—
(log yok)
| @@ -162,11 +162,8 @@ bool Curl_resolv_knows_https(struct Curl_easy *data, uint32_t resolv_id); | |
| #define Curl_resolv_destroy(x,y) Curl_nop_stmt | |
| #endif /* USE_CURL_ASYNC, else */ | |
| - | |
| CURLcode Curl_resolver_error(struct Curl_easy *data, const char *detail); | |
| - | |
| - | |
| #ifdef CURLRES_SYNCH | |
| /* | |
| * Curl_sync_getaddrinfo() is the non-async low-level name resolve API. | |
| @@ -178,7 +175,6 @@ struct Curl_addrinfo *Curl_sync_getaddrinfo(struct Curl_easy *data, | |
| const char *hostname, | |
| uint16_t port, | |
| uint8_t transport); | |
| - | |
| #endif | |
| #ifdef USE_UNIX_SOCKETS | |
| @@ -199,6 +199,26 @@ while(my $filename = <$git_ls_files>) { | |
| } | |
| } | |
| + | if($content =~ /\n\n\n\n/ || |
| + | $content =~ /\r\n\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 > 1) { |
| + | my $lineno = sprintf('3 or more consecutive empty lines @ line %d', $line); |
| + | push @err, $lineno; |
| + | } |
| + | $blank++; |
| + | } |
| + | else { |
| + | $blank = 0; |
| + | } |
| + | } |
| + | } |
| + | |
| if(!fn_match($filename, @longline)) { | |
| my $line = 0; | |
| for my $l (split(/\n/, $content)) { | |