From d45c0e1a5e89f01d83f6059c788524e901a11604 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Thu, 6 Jan 2022 22:54:20 +0100 Subject: check-format.pl: Fix report on missing space before +/-: allow, e.g., '1e-6' Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/17434) --- util/check-format.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/check-format.pl') diff --git a/util/check-format.pl b/util/check-format.pl index 8861b2bd8a..836fe30fa9 100755 --- a/util/check-format.pl +++ b/util/check-format.pl @@ -691,8 +691,8 @@ while (<>) { # loop over all lines of all input files report("no space before '=' or '='") if $intra_line =~ m/\S(=)/; # '=' etc. without preceding space report("no space before '$1'") if $intra_line =~ m/\S([|\/%<>^\?])/; # |/%<>^? without preceding space # TODO ternary ':' without preceding SPC, while allowing no SPC before ':' after 'case' - report("no space before binary '$1'") if $intra_line =~ m/[^\s{()\[]([+\-])/;# +/- without preceding space or {()[ - # or ')' (which is used f type casts) + report("no space before binary '$2'") if $intra_line =~ m/([^\s{()\[e])([+\-])/; # '+'/'-' without preceding space or {()[e + # ')' may be used for type casts or before "->", 'e' may be used for numerical literals such as "1e-6" report("no space before binary '$1'") if $intra_line =~ m/[^\s{()\[*!]([*])/; # '*' without preceding space or {()[*! report("no space before binary '$1'") if $intra_line =~ m/[^\s{()\[]([&])/; # '&' without preceding space or {()[ report("no space after ternary '$1'") if $intra_line =~ m/(:)[^\s\d]/; # ':' without following space or digit -- cgit v1.2.3