Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Apr 2024 20:04:13 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: ea6f2d7797c4 - main - checkstyle9.pl: Warn if there's no SOB line
Message-ID:  <202404232004.43NK4DlJ012030@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=ea6f2d7797c447e3c128b94ae7d825284a137600

commit ea6f2d7797c447e3c128b94ae7d825284a137600
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-04-23 20:03:28 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-04-23 20:04:08 +0000

    checkstyle9.pl: Warn if there's no SOB line
    
    If there's no Signed-off-by: line, complain.
    
    Sponsored by:           Netflix
---
 tools/build/checkstyle9.pl | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/build/checkstyle9.pl b/tools/build/checkstyle9.pl
index df9ec2bbd7c1..7fa02bcabc97 100755
--- a/tools/build/checkstyle9.pl
+++ b/tools/build/checkstyle9.pl
@@ -1252,6 +1252,7 @@ sub process {
 
 	my $in_header_lines = $file ? 0 : 1;
 	my $in_commit_log = 0;		#Scanning lines before patch
+	my $has_sob = 0;
 	my $non_utf8_charset = 0;
 
 	our @report = ();
@@ -1456,14 +1457,17 @@ sub process {
 		if ($line =~ /^\s*signed-off-by:/i) {
 			# This is a signoff, if ugly, so do not double report.
 			$in_commit_log = 0;
+			$has_sob = 1;
 
 			if (!($line =~ /^\s*Signed-off-by:/)) {
 				ERROR("The correct form is \"Signed-off-by\"\n" .
 					$herecurr);
+				$has_sob = 0;
 			}
 			if ($line =~ /^\s*signed-off-by:\S/i) {
 				ERROR("space required after Signed-off-by:\n" .
 					$herecurr);
+				$has_sob = 0;
 			}
 		}
 
@@ -2649,6 +2653,10 @@ sub process {
 
 	}
 
+	if ($has_sob == 0) {
+	    ERROR("Missing Signed-off-by: line");
+	}
+
 	# If we have no input at all, then there is nothing to report on
 	# so just keep quiet.
 	if ($#rawlines == -1) {



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