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: [email protected]
          Reporter: [email protected]
  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.

Reply via email to