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

filter: Statementstmt 72.0% 18 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 55.5% 5 / 9 Podpod 100% 1 / 1 totaltotal 68.5% 24 / 35 CC 1 SCAR 3.7
CC
1
Cov
72%
_build_cmd
2.0
transform_file
2.0
__ANON__
2.0
CRAP 1.4
↑ Summary
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 package Code::TidyAll::Plugin::YAPF;
4  
5 1 ▶use IPC::Run3 qw(run3);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Try::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 extends 'Code::TidyAll::Plugin';
9  
10 1 our $VERSION = '0.18';
11  
12 0 ▶sub _build_cmd { 'yapf' }
Subroutine _build_cmd: not called CC=1 SCAR=6.9
13  
14 0 ▶sub transform_file {
Subroutine transform_file: not called CC=1 SCAR=6.9
Pod documented
15 0 my ( $self, $file ) = @_;
16  
17 0 ▶ try {
Subroutine __ANON__: not called CC=1 SCAR=6.9
18 0 my $cmd = join( q{ }, $self->cmd, '-i', $self->argv, $file );
19  
20 0 my $output;
21 0 run3( $cmd, \undef, \$output, \$output );
22 }
23 0 ▶ catch {
Subroutine __ANON__: not called CC=1 SCAR=6.9
24 0 die sprintf(
25 "%s exited with error - possibly bad arg list '%s'\n $_",
26 $self->cmd,
27 $self->argv
28 );
29 0 };
30 }
31  
32 1 1;
33  
34 # ABSTRACT: Code::TidyAll plugin to tidy Python code via yapf
35  
36 __END__
↑ Summary