Test::Perl::Critic::Git - Test module to run perl critic on changed git files
Version 0.000200
Run perl critic on changed files and and raises errors, or even not :-D
Params:
Arrayref of String from directories which should be tested in the git-project.
Same as critic_on_changed_ok but vice versa
Hash-Ref: direct import params for Perl::Critic Hash-Ref: direct import params for Git Hash-Ref: params in which conditions should be checked.
eval "use Test::Perl::Critic::Git"; plan skip_all => "Test::Perl::Critic::Git required for testing perl critic" if $@; Test::Perl::Critic::Git->import({ -severity => 'brutal', -profile => File::Spec->catfile($Bin, 'critic', 'profilerc'), ... });
or
Test::Perl::Critic::Git->import( { -severity => 'brutal', -profile => File::Spec->catfile($Bin, 'critic', 'profilerc'), ... }, { Directory => '/srv/git/cogito.git' } );
Test::Perl::Critic::Git->import( { -severity => 'brutal', -profile => File::Spec->catfile($Bin, 'critic', 'profilerc'), ... }, {}, # do not test pl files and unit tests { exclude => ['pl','t'] } ); critic_on_changed_ok([ '.', ... ]); critic_on_changed_ok( ['.'], 'critic_on_changed_ok test' ); critic_on_changed_not_ok( ['.'], 'critic_on_changed_not_ok test' );
Internal usage
Carp, Git::Diff, Perl::Critic, Test::Builder, Perl::Critic::Utils, Perl::Critic::Violation
A list of current bugs and issues can be found at the CPAN site
https://gitlab.com/mziescha/test-perl-critic-git/issues
To report a new bug or problem, use the link on this page.
Test module to run perl critic on changed git files
configurable by import sub
Mario Zieschang, <mziescha at cpan.org>
<mziescha at cpan.org>
To install Test::Perl::Critic::Git, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Perl::Critic::Git
CPAN shell
perl -MCPAN -e shell install Test::Perl::Critic::Git
For more information on module installation, please visit the detailed CPAN module installation guide.