Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2024 00:58:01 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 57623b3b745a - main - checkstyle9.pl: Soften the single line braces requirement
Message-ID:  <202401160058.40G0w1Jn070535@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=57623b3b745a2a89ea9b998cadf8cc8c02228fea

commit 57623b3b745a2a89ea9b998cadf8cc8c02228fea
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-01-15 21:48:01 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-01-16 00:57:28 +0000

    checkstyle9.pl: Soften the single line braces requirement
    
    We inherited the error for single line statements needing braces from
    the original script. Style(9) allow that, and could be read to encourage
    that, but does not require that.
    
    Sponsored by:           Netflix
---
 tools/build/checkstyle9.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/build/checkstyle9.pl b/tools/build/checkstyle9.pl
index 3b28fef93669..8b30baa10fc9 100755
--- a/tools/build/checkstyle9.pl
+++ b/tools/build/checkstyle9.pl
@@ -2546,7 +2546,7 @@ sub process {
 					$herectx .= raw_line($linenr, $n) . "\n";;
 				}
 
-				ERROR("braces {} are necessary even for single statement blocks\n" . $herectx);
+				WARN("braces {} are encouraged even for single statement blocks\n" . $herectx);
 			}
 		}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401160058.40G0w1Jn070535>