blib/lib/Code/TidyAll/Plugin/PerlCritic.pm

filter: Statementstmt 78.9% 15 / 19 Branchbran 25.0% 1 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 72.4% 21 / 29 CC 2 SCAR 9.8
CC
2
Cov
70%
validate_file
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« blib/lib/Code/TidyAll/Plugin/PodChecker.pm ↑ Summary blib/lib/Code/TidyAll/Role/RunsCommand.pm »
1 package Code::TidyAll::Plugin::PerlCritic;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 extends 'Code::TidyAll::Plugin';
9  
10 2 with 'Code::TidyAll::Role::RunsCommand';
11  
12 2 our $VERSION = '0.85';
13  
14 # On Windows only the batch file is actually executable.
15 2 ▶my $cmd = $^O eq 'MSWin32' ? 'perlcritic.bat' : 'perlcritic';
Branch: 1 branch
BranchTrueFalseTotal
$^O eq 'MSWin32' ? : 0 2 2
16 1 ▶sub _build_cmd {$cmd}
Subroutine _build_cmd: called CC=1 SCAR=0.0
17  
18 0 ▶sub validate_file {
Subroutine validate_file: not called CC=2 SCAR=17.9
Pod documented
19 0 my ( $self, $file ) = @_;
20  
21 0 my $output = $self->_run_or_die($file);
22 0 ▶ die "$output\n" unless $output =~ /^.* source OK\n/s;
Branch: 1 branch
BranchTrueFalseTotal
unless $output =~ /^.* source OK\n/s 0 0 0
23  
24 0 return;
25 }
26  
27 2 1;
28  
29 # ABSTRACT: Use perlcritic with tidyall
30  
31 __END__
« blib/lib/Code/TidyAll/Plugin/PodChecker.pm ↑ Summary blib/lib/Code/TidyAll/Role/RunsCommand.pm »