aboutsummaryrefslogtreecommitdiff
path: root/tools/build
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2024-04-23 20:03:28 +0000
committerWarner Losh <imp@FreeBSD.org>2024-04-23 20:04:08 +0000
commitea6f2d7797c447e3c128b94ae7d825284a137600 (patch)
treef24975cc89654ef2bc39d68eeefda8b03fae12cf /tools/build
parente75a1bbc233bf112b9eb98a20ad4bdf9bc14b2cf (diff)
downloadsrc-ea6f2d7797c447e3c128b94ae7d825284a137600.tar.gz
src-ea6f2d7797c447e3c128b94ae7d825284a137600.zip
checkstyle9.pl: Warn if there's no SOB line
If there's no Signed-off-by: line, complain. Sponsored by: Netflix
Diffstat (limited to 'tools/build')
-rwxr-xr-xtools/build/checkstyle9.pl8
1 files changed, 8 insertions, 0 deletions
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) {