[Bug 8409] New: t/perlcritic.t fails withSubroutines::ProhibitExplicitReturnUndef

[email protected]
Newsgroups gmane.mail.spam.spamassassin.devel
Message-ID <[email protected]/SpamAssassin/>
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8409

            Bug ID: 8409
           Summary: t/perlcritic.t fails
                    withSubroutines::ProhibitExplicitReturnUndef
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: Regression Tests
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: Undefined

Responding to PR #37 on our GitHub mirror.

To demonstrate this bug, install
Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef from CPAN and
run the t/perlcritic.t test.

This is trickier than simply changing the code or quieting the Perlcritic
warning, it needs case by case analysis.

See bug #7120 for an example where this should not be "fixed" by following
Perlcritic's guidance to change return undef; to return;

I'm using an AI-assisted search to identify the places where return undef; is
in a function that can be proved to not be called in such a way as to possibly
break if it is changed to return; and I'm taking the conservative approach of
leaving it as return undef; with a comment to suppress the Perlcritic warning
if that can't be proved, including when it is possible that the function will
be called from a plugin that is not in our source tree.

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.