← Commit list

7b96563a05

Viktor Szakats
Viktor Szakats
2026-04-06
SUCCESS Duration: 253s

Subject

spacecheck.pl: fix to check 3+ newlines in all files

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/hostip.h+0 -4
@@ -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
scripts/spacecheck.pl+20 -0
@@ -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)) {