mirror of
https://github.com/curl/curl.git
synced 2026-07-24 17:07:16 +03:00
tidy-up: miscellaneous
- vms/curlmsg_vms.h: delete unused/commented code. - vtls/schannel_verify: sort includes. - typecheck-gcc.h: fix indent and alignment. - lib/config-win32.h: drop idle `#undef`. - spacecheck: check for stray empty lines before after curly braces. - make literals more readable: 1048576 -> 1024 * 1024 - scope variables. - use ISO date in a comment. - drop redundant parentheses. - drop empty comments. - unfold lines. - duplicate/stray spaces in comments. - fix indent, whitespace, minor typos. Closes #20690
This commit is contained in:
parent
ac46392f44
commit
af78b199b2
89 changed files with 424 additions and 448 deletions
|
|
@ -180,6 +180,26 @@ while(my $filename = <$git_ls_files>) {
|
|||
$linepos += $line;
|
||||
}
|
||||
|
||||
$search = $content;
|
||||
$linepos = 0;
|
||||
while($search =~ /\n\n *}\n/) {
|
||||
my $part = substr($search, 0, $+[0] - 1);
|
||||
$search = substr($search, $+[0]);
|
||||
my $line = ($part =~ tr/\n//);
|
||||
push @err, sprintf("line %d: '}' preceded by empty line", $linepos + $line);
|
||||
$linepos += $line + 1;
|
||||
}
|
||||
|
||||
$search = $content;
|
||||
$linepos = 0;
|
||||
while($search =~ /\n\{\n\n/) {
|
||||
my $part = substr($search, 0, $+[0]);
|
||||
$search = substr($search, $+[0]);
|
||||
my $line = ($part =~ tr/\n//);
|
||||
push @err, sprintf("line %d: top-level '{' followed by empty line", $linepos + $line);
|
||||
$linepos += $line;
|
||||
}
|
||||
|
||||
if($content =~ /([\x00-\x08\x0b\x0c\x0e-\x1f\x7f])/) {
|
||||
push @err, "content: has binary contents";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue