Permalink
Browse files

Update perlcritic stack

  • Loading branch information...
1 parent 4b0598e commit af8165d79565a51cbc57c0a6842775904feda134 @kentfredric kentfredric committed Mar 1, 2014
Showing with 497 additions and 5 deletions.
  1. +44 −0 maint/perlcritic.rc.gen.pl
  2. +15 −0 perlcritic.deps
  3. +438 −5 perlcritic.rc
@@ -0,0 +1,44 @@
+#!/usr/bin/env perl
+# FILENAME: bundle_to_ini.pl
+# CREATED: 02/06/14 01:48:56 by Kent Fredric (kentnl) <kentfredric@gmail.com>
+# ABSTRACT: Write an INI file from a bundle
+
+use strict;
+use warnings;
+use utf8;
+
+use Carp qw( croak carp );
+use Perl::Critic::ProfileCompiler::Util qw( create_bundle );
+
+my $bundle = create_bundle('Example::Author::KENTNL');
+$bundle->configure;
+
+my @stopwords = ( qw[behaviours pluggable accessor accessors introspectable], );
+for my $var (@stopwords) {
+ $bundle->add_or_append_policy_field( 'Documentation::PodSpelling' => ( 'stop_words' => $var ) );
+}
+
+#$bundle->add_or_append_policy_field(
+# 'Subroutines::ProhibitCallsToUndeclaredSubs' => ( 'exempt_subs' => 'String::Formatter::str_rf' ), );
+#
+#$bundle->remove_policy('ErrorHandling::RequireCarping');
+#$bundle->remove_policy('NamingConventions::Capitalization');
+
+my $inf = $bundle->actionlist->get_inflated;
+
+my $config = $inf->apply_config;
+{
+ open my $rcfile, '>', './perlcritic.rc' or croak 'Cant open perlcritic.rc';
+ $rcfile->print( $config->as_ini, "\n" );
+ close $rcfile or croak 'Something fubared closing perlcritic.rc';
+}
+my $deps = $inf->own_deps;
+{
+ open my $depsfile, '>', './perlcritic.deps' or croak 'Cant open perlcritic.deps';
+ for my $key ( sort keys %{$deps} ) {
+ $depsfile->printf( "%s~%s\n", $key, $deps->{$key} );
+ *STDERR->printf( "%s => %s\n", $key, $deps->{$key} );
+ }
+ close $depsfile or carp 'Something fubared closing perlcritic.deps';
+}
+
View
@@ -0,0 +1,15 @@
+Perl::Critic::Policy::Documentation::PodSpelling~0
+Perl::Critic::Policy::Lax::RequireExplicitPackage::ExceptForPragmata~0
+Perl::Critic::Policy::Variables::ProhibitUnusedVarsStricter~0
+Perl::Critic::ProfileCompiler::Bundle::Bangs~0
+Perl::Critic::ProfileCompiler::Bundle::Compatibility~0
+Perl::Critic::ProfileCompiler::Bundle::Core~0
+Perl::Critic::ProfileCompiler::Bundle::Deprecated~0
+Perl::Critic::ProfileCompiler::Bundle::Itch~0
+Perl::Critic::ProfileCompiler::Bundle::Lax~0
+Perl::Critic::ProfileCompiler::Bundle::Moose~0
+Perl::Critic::ProfileCompiler::Bundle::More~0
+Perl::Critic::ProfileCompiler::Bundle::Pulp~0
+Perl::Critic::ProfileCompiler::Bundle::StricterSubs~0
+Perl::Critic::ProfileCompiler::Bundle::Swift~0
+Perl::Critic::ProfileCompiler::Bundle::Tics~0
Oops, something went wrong.

0 comments on commit af8165d

Please sign in to comment.