Skip to content

Commit

Permalink
checkstyle9.pl: Remove unneeded checks
Browse files Browse the repository at this point in the history
Both the bad email check and the signoff check are handled in the
"checklist" github workflow now.

Reviewed by:	emaste, imp
Pull request:	#1570

Signed-off-by: Ahmad Khalifa <[email protected]>
  • Loading branch information
VexedUXR authored and emaste committed Jan 24, 2025
1 parent a9a6a51 commit ca36371
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions tools/build/checkstyle9.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1253,8 +1253,6 @@ sub process {

my $in_header_lines = $file ? 0 : 1;
my $in_commit_log = 0; #Scanning lines before patch
my $has_sob = 0;
my $author_is_committer = 0;
my $non_utf8_charset = 0;

our @report = ();
Expand Down Expand Up @@ -1450,33 +1448,6 @@ sub process {
$is_patch = 1;
}

# Filter out bad email addresses.
if ($line =~ /^(Author|From): .*noreply.*/) {
ERROR("Real email adress is needed\n" . $herecurr);
}

if ($line =~ /^Author: .*[a-z-0-9]\@freebsd\.org/i) {
$author_is_committer = 1
}

#check the patch for a signoff:
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;
}
}

# Check for wrappage within a valid hunk of the file
if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
ERROR("patch seems to be corrupt (line wrapped?)\n" .
Expand Down Expand Up @@ -2659,10 +2630,6 @@ sub process {

}

if ($has_sob == 0 && $author_is_committer == 0) {
WARN("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) {
Expand Down

0 comments on commit ca36371

Please sign in to comment.