From 6bad7d2486b373015db5917d7a9641266861c607 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 29 May 2024 09:59:27 -0600 Subject: [PATCH] checkstyle9.pl: Add check for missing space between ) { Sponsored by: Netflix --- tools/build/checkstyle9.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/build/checkstyle9.pl b/tools/build/checkstyle9.pl index 24e33712ceda..7c2b2c0f5b5b 100755 --- a/tools/build/checkstyle9.pl +++ b/tools/build/checkstyle9.pl @@ -1556,6 +1556,11 @@ sub process { } } +# Check for ){ + if ($rawline =~ /^.*\)\{\n/) { + ERROR("Missing space before brace\n". $herecurr); + } + # check for spaces before a quoted newline if ($rawline =~ /^.*\".*\s\\n/) { ERROR("unnecessary whitespace before a quoted newline\n" . $herecurr);