diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-09-28 08:18:32 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-09-30 20:51:23 +0200 |
commit | 8e655da0225eb399675aaa05f4ba36e9347043ca (patch) | |
tree | a605a682e4c7ee719cdb8811da2213606d246c41 /util/check-format.pl | |
parent | df4ec3920386b1e6cba0976dac36b3c2456090fc (diff) | |
download | openssl-new-8e655da0225eb399675aaa05f4ba36e9347043ca.tar.gz |
check-format.pl: Extend exceptions for no SPC after trailing ';' in 'for (...;)'
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13019)
Diffstat (limited to 'util/check-format.pl')
-rwxr-xr-x | util/check-format.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/check-format.pl b/util/check-format.pl index e3c0eaddb0..8852f3df8c 100755 --- a/util/check-format.pl +++ b/util/check-format.pl @@ -658,7 +658,8 @@ while (<>) { # loop over all lines of all input files # treat remaining blinded comments and string literal contents as (single) space during matching below $intra_line =~ s/@+/ /g; # note that double SPC has already been handled above $intra_line =~ s/\s+$//; # strip any (resulting) space at EOL - $intra_line =~ s/(for\s*\();;(\))/"$1$2"/eg; # strip ';;' in for (;;) + $intra_line =~ s/(for\s*\([^;]*);;(\))/"$1$2"/eg; # strip trailing ';;' in for (;;) + $intra_line =~ s/(for\s*\([^;]+;[^;]+);(\))/"$1$2"/eg; # strip trailing ';' in for (;;) $intra_line =~ s/(=\s*)\{ /"$1@ "/eg; # do not report {SPC in initializers such as ' = { 0, };' $intra_line =~ s/, \};/, @;/g; # do not report SPC} in initializers such as ' = { 0, };' report("SPC before '$1'") if $intra_line =~ m/[\w)\]]\s+(\+\+|--)/; # postfix ++/-- with preceding space |