Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic CPAN distribution.

Report information
The Basics
Id: 84945
Status: new
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: DICHI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.118
Fixed in: (no value)



Subject: Allow Perl::Critic::Policy::CodeLayout::RequireTidyCode to configure source formatter class
Download (untitled) / with headers
text/plain 410b
Perl::Critic::Policy::CodeLayout::RequireTidyCode uses Perl::Tidy to verify code tidiness. Now with modules like Method::Signatures (or others) you can extend Perl's syntax to add more sugar. Those enhancements don't get along well with Perl::Tidy, there are Tidy's sub-classes that take into account the syntax suggar. The suggested change allow user to configure which class to be used as source formatter.
Subject: formatter_class.patch
18,19d17 < use Perl::Tidy qw< >; < 27,28c25,27 < Readonly::Scalar my $DESC => q{Code is not tidy}; < Readonly::Scalar my $EXPL => [ 33 ]; --- > Readonly::Scalar my $DESC => q{Code is not tidy}; > Readonly::Scalar my $EXPL => [ 33 ]; > Readonly::Scalar my $DEFAULT_FORMATTER_CLASS => 'Perl::Tidy'; 38a38,42 > { > name => 'formatter_class', > description => 'Source formatter class name. Default Perl::Tidy.', > default_string => $DEFAULT_FORMATTER_CLASS, > } 50a55,57 > eval "use $self->{_formatter_class} qw< >"; > return $FALSE if $@; > 114c121,123 < Perl::Tidy::perltidy( --- > my $code = $self->{_formatter_class}->can('perltidy'); > > $code->( 183a193,198 > You can also configure the Source Formatter Class, to specify a different > class other than Perl::Tidy (i.e. Perl::Tidy::Sweetened ). By default it > uses Perl::Tidy. > > [CodeLayout::RequireTidyCode] > formatter_class = Perl::Tidy::Sweetened


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.