You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@spamassassin.apache.org on 2026/10/14 21:10:50 UTC
[Bug 8440] New: t/perlcritic.t fails withSubroutines::ProhibitExplicitReturnUndef
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8440
Bug ID: 8440
Summary: t/perlcritic.t fails
withSubroutines::ProhibitExplicitReturnUndef
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Libraries
Assignee: dev@spamassassin.apache.org
Reporter: frodo@morgul.net
Target Milestone: Undefined
Created attachment 6126
--> https://bz.apache.org/SpamAssassin/attachment.cgi?id=6126&action=edit
proposed fix
This is similar to bug 8409. It seems that the triggering code was introduced
with the fix to #8429.
2026-10-14T20:19:39.945043Z 01O # Failed test 'Test::Perl::Critic for
"../blib/lib/Mail/SpamAssassin/Message/Node.pm"'
2026-10-14T20:19:39.945043Z 01O # at /usr/share/perl5/Test/Perl/Critic.pm
line 121.
2026-10-14T20:19:39.945044Z 01O #
2026-10-14T20:19:39.945044Z 01O # [Subroutines::ProhibitExplicitReturnUndef]
"return" statement with explicit "undef" at line 556, near 'return undef;'.
(Severity: 5)
I believe that changing the final `return undef` to `return` in detect_utf16()
is safe here, as the function is only called in one place and it will handle
the empty return correctly.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 8440] t/perlcritic.t fails withSubroutines::ProhibitExplicitReturnUndef
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8440
Sidney Markowitz <si...@sidney.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Sidney Markowitz <si...@sidney.com> ---
% svn ci -m "Bug 8440 - fix perlcritic return undef warning"
lib/Mail/SpamAssassin/Message/Node.pm
Sending lib/Mail/SpamAssassin/Message/Node.pm
Transmitting file data .done
Committing transaction...
Committed revision 1939298.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 8440] t/perlcritic.t fails withSubroutines::ProhibitExplicitReturnUndef
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8440
Sidney Markowitz <si...@sidney.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|Undefined |4.0.3
CC| |sidney@sidney.com
--- Comment #1 from Sidney Markowitz <si...@sidney.com> ---
+1 on the patch
I found other places it is called, but 'return;' breaks none of them, and the
function is not likely to have been used by any external plugin we don't know
about.
I'm targeting this for 4.0.3 so it can release with a clean make test.
We need votes to commit.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 8440] t/perlcritic.t fails withSubroutines::ProhibitExplicitReturnUndef
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8440
Bill Cole <bi...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |billcole@apache.org
--- Comment #4 from Bill Cole <bi...@apache.org> ---
+1 for the patch
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 8440] t/perlcritic.t fails withSubroutines::ProhibitExplicitReturnUndef
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8440
Giovanni Bechis <gi...@paclan.it> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |giovanni@paclan.it
--- Comment #2 from Giovanni Bechis <gi...@paclan.it> ---
+1 on the patch
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 8440] t/perlcritic.t fails withSubroutines::ProhibitExplicitReturnUndef
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8440
Kent Oyer <ke...@mxguardian.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kent@mxguardian.net
--- Comment #3 from Kent Oyer <ke...@mxguardian.net> ---
+1 to commit
--
You are receiving this mail because:
You are the assignee for the bug.