scripts: fix perl indentation, whitespace, semicolons

Ref: #17116

Closes #17209
This commit is contained in:
Viktor Szakats 2025-04-28 14:57:16 +02:00
parent fd4c342d88
commit 3fcddc835c
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
14 changed files with 1418 additions and 1422 deletions

View file

@ -480,10 +480,10 @@ sub scanfile {
my $count = 0;
while($l =~ /([\d]{4})/g) {
push @copyright, {
year => $1,
line => $line,
col => index($l, $1),
code => $l
year => $1,
line => $line,
col => index($l, $1),
code => $l
};
$count++;
}
@ -874,7 +874,7 @@ sub scanfile {
$suff =~ s/\(/\\(/;
$l =~ s/$prefix$bad$suff/$prefix$replace/;
goto again;
}
}
$l = $bl; # restore to pre-bannedfunc content
if($warnings{"STDERR"}) {
@ -1040,16 +1040,16 @@ sub scanfile {
}
preproc:
if($prep) {
# scan for use of banned symbols on a preprocessor line
if($l =~ /^(^|.*\W)
(WIN32)
(\W|$)
/x) {
checkwarn("BANNEDPREPROC",
$line, length($1), $file, $ol,
"use of $2 is banned from preprocessor lines" .
(($2 eq "WIN32") ? ", use _WIN32 instead" : ""));
}
# scan for use of banned symbols on a preprocessor line
if($l =~ /^(^|.*\W)
(WIN32)
(\W|$)
/x) {
checkwarn("BANNEDPREPROC",
$line, length($1), $file, $ol,
"use of $2 is banned from preprocessor lines" .
(($2 eq "WIN32") ? ", use _WIN32 instead" : ""));
}
}
$line++;
$prevp = $prep;