summaryrefslogtreecommitdiffstats
path: root/util/check-format.pl
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2022-01-06 23:14:27 +0100
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2022-07-20 13:07:02 +0200
commit18b1d210c0a2e7a0b95d43088d3e922d47972b37 (patch)
tree1e36af515f58629bf81630b6b924fed6b7fe50ad /util/check-format.pl
parente7abe53a19f571a06008ec8abe31cb6e1c074286 (diff)
check-format.pl: Fix report on space before ';' and allow it after ')'
Reviewed-by: Paul Dale <pauli@openssl.org> (cherry picked from commit c30bc4e2093f47a37736944da548653bc08d774d)
Diffstat (limited to 'util/check-format.pl')
-rwxr-xr-xutil/check-format.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/check-format.pl b/util/check-format.pl
index 836fe30fa9..17bdc0aa15 100755
--- a/util/check-format.pl
+++ b/util/check-format.pl
@@ -684,7 +684,7 @@ while (<>) { # loop over all lines of all input files
report("space before '$1'") if $intra_line =~ m/\s(\.|->)/; # '.' or '->' with preceding space
report("space after '$1'") if $intra_line =~ m/(\.|->)\s/; # '.' or '->' with following space
$intra_line =~ s/\-\>|\+\+|\-\-/@/g; # blind '->,', '++', and '--'
- report("space before '$2'") if $intra_line =~ m/[^:]\s+(;)/; # space before ';' but not after ':'
+ report("space before '$1'") if $intra_line =~ m/[^:)]\s+(;)/; # space before ';' but not after ':' or ')'
report("space before '$1'") if $intra_line =~ m/\s([,)\]])/; # space before ,)]
report("space after '$1'") if $intra_line =~ m/([(\[~!])\s/; # space after ([~!
report("space after '$1'") if $intra_line =~ m/(defined)\s/; # space after 'defined'