Skip to content

Subroutines::ProhibitCallsToUnexportedSubs emits warnings even when there is a "no critic" annotation #19

@oalders

Description

@oalders

This is related to houseabsolute/precious#32

perlcritic --version
1.140
perl -MPerl::Critic::Policy::Subroutines::ProhibitCallsToUnexportedSubs -e 'print $Perl::Critic::Policy::Subroutines::ProhibitCallsToUnexportedSubs::VERSION'
0.06
use strict;
use warnings;

## no critic (Subroutines::ProhibitCallsToUnexportedSubs)
use Git::Sub qw( config );

my @conf = git::config('--list');

$ cat .perlcriticrc

verbose = 3
severity = 3
program-extensions = pl

[Subroutines::ProhibitCallsToUnexportedSubs]
$ perlcritic git-sub.pl
Subroutines::ProhibitCallsToUnexportedSubs: Cannot find source file "git.pm"
Use of "git::config" without including "git" at git-sub.pl line 7

In this case, there should be no warning and no critic violation. It's not clear to me what's going on here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions