mirror of
https://github.com/curl/curl.git
synced 2026-05-16 04:06:20 +03:00
tidy-up: miscellaneous
- drop stray duplicate empty lines in docs, scripts, test data, include, examples, tests. - drop duplicate PP parenthesis. - curl-functions.m4: move literals to the right side in if expressions, to match rest of the source code. - FAQ.md: delete language designator from an URL. - packages: apply clang-format (OS400, VMS). - scripts/schemetable.c: apply clang-format. - data320: delete duplicate empty line that doesn't change the outcome. - spacecheck: extend to check for duplicate empty lines (with exceptions.) - fix whitespace nits Closes #19936
This commit is contained in:
parent
141ce4be64
commit
fe8393d7db
116 changed files with 674 additions and 1039 deletions
1
.github/scripts/cmp-config.pl
vendored
1
.github/scripts/cmp-config.pl
vendored
|
|
@ -136,6 +136,5 @@ foreach my $v (keys %remove) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
# return the exit code from diff
|
||||
exit system("diff -u /tmp/autotools /tmp/cmake") >> 8;
|
||||
|
|
|
|||
1
.github/scripts/randcurl.pl
vendored
1
.github/scripts/randcurl.pl
vendored
|
|
@ -116,7 +116,6 @@ my %commonrc = (
|
|||
'26' => 1,
|
||||
);
|
||||
|
||||
|
||||
sub runone {
|
||||
my $a;
|
||||
my $nargs = getnum(60) + 1;
|
||||
|
|
|
|||
26
.github/scripts/spacecheck.pl
vendored
26
.github/scripts/spacecheck.pl
vendored
|
|
@ -39,6 +39,13 @@ my @need_crlf = (
|
|||
"\\.(bat|sln)\$",
|
||||
);
|
||||
|
||||
my @double_empty_lines = (
|
||||
"^lib/.+\\.(c|h)\$",
|
||||
"^packages/",
|
||||
"^tests/data/test",
|
||||
"\\.(m4|py)\$",
|
||||
);
|
||||
|
||||
my @non_ascii_allowed = (
|
||||
'\xC3\xB6', # UTF-8 for https://codepoints.net/U+00F6 LATIN SMALL LETTER O WITH DIAERESIS
|
||||
);
|
||||
|
|
@ -100,7 +107,7 @@ while(my $filename = <$git_ls_files>) {
|
|||
my @err = ();
|
||||
|
||||
if(!fn_match($filename, @tabs) &&
|
||||
$content =~ /\t/) {
|
||||
$content =~ /\t/) {
|
||||
push @err, "content: has tab";
|
||||
}
|
||||
|
||||
|
|
@ -111,12 +118,12 @@ while(my $filename = <$git_ls_files>) {
|
|||
}
|
||||
|
||||
if($eol ne "crlf" &&
|
||||
fn_match($filename, @need_crlf)) {
|
||||
fn_match($filename, @need_crlf)) {
|
||||
push @err, "content: must use CRLF EOL for this file type";
|
||||
}
|
||||
|
||||
if($eol ne "lf" && $content ne "" &&
|
||||
!fn_match($filename, @need_crlf)) {
|
||||
!fn_match($filename, @need_crlf)) {
|
||||
push @err, "content: must use LF EOL for this file type";
|
||||
}
|
||||
|
||||
|
|
@ -131,20 +138,27 @@ while(my $filename = <$git_ls_files>) {
|
|||
}
|
||||
|
||||
if($content ne "" &&
|
||||
$content !~ /\n\z/) {
|
||||
$content !~ /\n\z/) {
|
||||
push @err, "content: has no EOL at EOF";
|
||||
}
|
||||
|
||||
if($content =~ /\n\n\z/ ||
|
||||
$content =~ /\r\n\r\n\z/) {
|
||||
$content =~ /\r\n\r\n\z/) {
|
||||
push @err, "content: has multiple EOL at EOF";
|
||||
}
|
||||
|
||||
if($content =~ /\n\n\n\n/ ||
|
||||
$content =~ /\r\n\r\n\r\n\r\n/) {
|
||||
$content =~ /\r\n\r\n\r\n\r\n/) {
|
||||
push @err, "content: has 3 or more consecutive empty lines";
|
||||
}
|
||||
|
||||
if(!fn_match($filename, @double_empty_lines)) {
|
||||
if($content =~ /\n\n\n/ ||
|
||||
$content =~ /\r\n\r\n\r\n/) {
|
||||
push @err, "content: has 2 consecutive empty lines";
|
||||
}
|
||||
}
|
||||
|
||||
if($content =~ /([\x00-\x08\x0b\x0c\x0e-\x1f\x7f])/) {
|
||||
push @err, "content: has binary contents";
|
||||
}
|
||||
|
|
|
|||
1
.github/scripts/verify-synopsis.pl
vendored
1
.github/scripts/verify-synopsis.pl
vendored
|
|
@ -39,7 +39,6 @@ sub testcompile {
|
|||
return $rc;
|
||||
}
|
||||
|
||||
|
||||
sub extract {
|
||||
my($f) = @_;
|
||||
my $syn = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue