From d7f1e37753a59b6422d05fb6868000c9a6842ca3 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Fri, 25 Nov 2011 15:38:20 +0000 Subject: my dzil settings --- .gitignore | 12 ++++++++++ dist.ini | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 .gitignore create mode 100644 dist.ini diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6fbabd9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +blib +pm_to_blib +*.sw? +Makefile +Makefile.old +MANIFEST.bak +*.tar.gz +/inc/ +META.yml +.prove +*~ +/.build/ diff --git a/dist.ini b/dist.ini new file mode 100644 index 0000000..95f2444 --- /dev/null +++ b/dist.ini @@ -0,0 +1,74 @@ +author = Gianni Ceccarelli +license = Perl_5 +copyright_holder = Gianni Ceccarelli +copyright_year = 2011 + +[GatherDir] + +[PodWeaver] + +[PruneCruft] + +[PruneFiles] +match = ~$ + +[Git::Check] +allow_dirty = dist.ini + +[Git::NextVersion] +first_version = 0.0.1 + +[Git::Commit] + +[Git::CommitBuild] + +[Git::Tag / master] +tag_format = v%v-dzilla + +[Git::Tag / build] +branch = build/master +tag_format = v%v + +[CheckChangeLog] + +[NextRelease] + +[AutoPrereqs] + +[PkgDist] + +[PkgVersion] + +[ManifestSkip] + +[NoTabsTests] + +[PodCoverageTests] + +[PodSyntaxTests] + +[ExtraTests] + +[MetaNoIndex] + +directory = t/lib + +[MetaYAML] + +[MetaJSON] + +[ExecDir] +dir = scripts + +[ShareDir] + +[MakeMaker] + +[Manifest] + +[TestRelease] + +[FakeRelease] + +;[ConfirmRelease] +;[UploadToCPAN] -- cgit v1.2.3 From 47f1876c3dbdbd0635b96af615ec00da71d88998 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Thu, 1 Dec 2011 17:35:02 +0000 Subject: pod::weaver config --- weaver.ini | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 weaver.ini diff --git a/weaver.ini b/weaver.ini new file mode 100644 index 0000000..c4643b6 --- /dev/null +++ b/weaver.ini @@ -0,0 +1,32 @@ +[@CorePrep] + +[-Encoding] + +[Name] +[Version] + +[Region / prelude] + +[Generic / SYNOPSIS] +[Generic / DESCRIPTION] +[Generic / OVERVIEW] + +[Collect / ATTRIBUTES] +command = attr + +[Collect / METHODS] +command = method + +[Collect / FUNCTIONS] +command = func + +[Leftovers] + +[Region / postlude] + +[Authors] +[Legal] + +[-Transformer / Lists] +transformer = List +format_name = list -- cgit v1.2.3 From febf89422306c76d9b9b8236cec3b831c62b3e78 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Thu, 8 Mar 2012 15:24:29 +0000 Subject: bump year --- dist.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist.ini b/dist.ini index 95f2444..0f76eb5 100644 --- a/dist.ini +++ b/dist.ini @@ -1,7 +1,7 @@ author = Gianni Ceccarelli license = Perl_5 copyright_holder = Gianni Ceccarelli -copyright_year = 2011 +copyright_year = 2012 [GatherDir] -- cgit v1.2.3 From 5396348d0967450d3243f6ef97b209b66232faf9 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Thu, 20 Jun 2013 16:59:36 +0100 Subject: fix plugin order --- dist.ini | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/dist.ini b/dist.ini index 0f76eb5..c4aebf3 100644 --- a/dist.ini +++ b/dist.ini @@ -1,7 +1,7 @@ author = Gianni Ceccarelli license = Perl_5 copyright_holder = Gianni Ceccarelli -copyright_year = 2012 +copyright_year = 2013 [GatherDir] @@ -18,17 +18,6 @@ allow_dirty = dist.ini [Git::NextVersion] first_version = 0.0.1 -[Git::Commit] - -[Git::CommitBuild] - -[Git::Tag / master] -tag_format = v%v-dzilla - -[Git::Tag / build] -branch = build/master -tag_format = v%v - [CheckChangeLog] [NextRelease] @@ -70,5 +59,16 @@ dir = scripts [FakeRelease] +[Git::Commit] + +[Git::CommitBuild] + +[Git::Tag / master] +tag_format = v%v-dzilla + +[Git::Tag / build] +branch = build/master +tag_format = v%v + ;[ConfirmRelease] ;[UploadToCPAN] -- cgit v1.2.3 From e9d32a350ee3ff1966ada3545f6ae18ff1f6a980 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Tue, 29 Jul 2014 09:38:06 +0100 Subject: update dzil & weaver --- dist.ini | 19 +++++++++++++------ weaver.ini | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/dist.ini b/dist.ini index c4aebf3..a2ff86c 100644 --- a/dist.ini +++ b/dist.ini @@ -1,7 +1,7 @@ author = Gianni Ceccarelli license = Perl_5 copyright_holder = Gianni Ceccarelli -copyright_year = 2013 +copyright_year = 2014 [GatherDir] @@ -38,8 +38,9 @@ first_version = 0.0.1 [ExtraTests] -[MetaNoIndex] +[Repository] +[MetaNoIndex] directory = t/lib [MetaYAML] @@ -55,6 +56,8 @@ dir = scripts [Manifest] +[License] + [TestRelease] [FakeRelease] @@ -62,13 +65,17 @@ dir = scripts [Git::Commit] [Git::CommitBuild] +branch = +release_branch = release/%b +release_message = Dzil-build release %v (from %h on %b) +multiple_inheritance = 1 [Git::Tag / master] tag_format = v%v-dzilla -[Git::Tag / build] -branch = build/master +[Git::Tag / release] +branch = release tag_format = v%v -;[ConfirmRelease] -;[UploadToCPAN] +[ConfirmRelease] +[UploadToCPAN] diff --git a/weaver.ini b/weaver.ini index c4643b6..a28e4da 100644 --- a/weaver.ini +++ b/weaver.ini @@ -1,6 +1,6 @@ [@CorePrep] -[-Encoding] +[SingleEncoding] [Name] [Version] -- cgit v1.2.3 From 2b60cda4061d5643477731f54c44754eea3011ea Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Tue, 29 Jul 2014 10:34:53 +0100 Subject: fix plugin invocation --- weaver.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weaver.ini b/weaver.ini index a28e4da..4cf1cae 100644 --- a/weaver.ini +++ b/weaver.ini @@ -1,6 +1,6 @@ [@CorePrep] -[SingleEncoding] +[-SingleEncoding] [Name] [Version] -- cgit v1.2.3 From 45737154053e35d4f71048978bb3e8b3a34e283e Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Tue, 29 Jul 2014 10:40:58 +0100 Subject: tag the right release branch --- dist.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist.ini b/dist.ini index a2ff86c..281b0ab 100644 --- a/dist.ini +++ b/dist.ini @@ -74,7 +74,7 @@ multiple_inheritance = 1 tag_format = v%v-dzilla [Git::Tag / release] -branch = release +branch = release/master tag_format = v%v [ConfirmRelease] -- cgit v1.2.3 From 86418fa14cb909fc8651d2efceca1a0810a84b46 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Tue, 29 Jul 2014 11:03:42 +0100 Subject: remove useless FakeRelease --- dist.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/dist.ini b/dist.ini index 281b0ab..00d1c97 100644 --- a/dist.ini +++ b/dist.ini @@ -60,8 +60,6 @@ dir = scripts [TestRelease] -[FakeRelease] - [Git::Commit] [Git::CommitBuild] -- cgit v1.2.3 From d7071392c23da6feb9099cbea4797b4163feeadc Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Tue, 29 Jul 2014 11:18:59 +0100 Subject: more updates --- .gitignore | 3 ++- dist.ini | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6fbabd9..b7e23ed 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,8 @@ Makefile.old MANIFEST.bak *.tar.gz /inc/ -META.yml +/META.* +/MYMETA.* .prove *~ /.build/ diff --git a/dist.ini b/dist.ini index 00d1c97..beb5675 100644 --- a/dist.ini +++ b/dist.ini @@ -69,11 +69,11 @@ release_message = Dzil-build release %v (from %h on %b) multiple_inheritance = 1 [Git::Tag / master] -tag_format = v%v-dzilla +tag_format = v%v%t-dzilla [Git::Tag / release] branch = release/master -tag_format = v%v +tag_format = v%v%t [ConfirmRelease] [UploadToCPAN] -- cgit v1.2.3 From aec880e48b98211d564e107c957fa1c7af238382 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Tue, 17 Feb 2015 14:09:24 +0000 Subject: minor update copyright year, and Test::NoTabs --- dist.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist.ini b/dist.ini index beb5675..bc73efc 100644 --- a/dist.ini +++ b/dist.ini @@ -1,7 +1,7 @@ author = Gianni Ceccarelli license = Perl_5 copyright_holder = Gianni Ceccarelli -copyright_year = 2014 +copyright_year = 2015 [GatherDir] @@ -30,7 +30,7 @@ first_version = 0.0.1 [ManifestSkip] -[NoTabsTests] +[Test::NoTabs] [PodCoverageTests] -- cgit v1.2.3 From 214711abc3d9b373c360692dce3d70dd6541f706 Mon Sep 17 00:00:00 2001 From: dakkar Date: Tue, 22 Dec 2015 11:05:39 +0000 Subject: some updates from usage - don't include dzil-specific files in distribution - use OurPkgVersion instead of PkgVersion - use Perl::Critic --- dist.ini | 8 +- perlcritic.rc | 466 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 471 insertions(+), 3 deletions(-) create mode 100644 perlcritic.rc diff --git a/dist.ini b/dist.ini index bc73efc..09f7b6c 100644 --- a/dist.ini +++ b/dist.ini @@ -11,6 +11,8 @@ copyright_year = 2015 [PruneFiles] match = ~$ +filename = dist.ini +filename = weaver.ini [Git::Check] allow_dirty = dist.ini @@ -24,14 +26,14 @@ first_version = 0.0.1 [AutoPrereqs] -[PkgDist] - -[PkgVersion] +[OurPkgVersion] [ManifestSkip] [Test::NoTabs] +[Test::Perl::Critic] + [PodCoverageTests] [PodSyntaxTests] diff --git a/perlcritic.rc b/perlcritic.rc new file mode 100644 index 0000000..651ba52 --- /dev/null +++ b/perlcritic.rc @@ -0,0 +1,466 @@ +verbose = %f:%l:%c:%p:%m\n +color = 1 +program-extensions = .PL .pl .t +only = 1 +severity = 2 + +# Use `List::MoreUtils::any' instead of `grep' in boolean context. +[BuiltinFunctions::ProhibitBooleanGrep] + +# Map blocks should have a single statement. +[-BuiltinFunctions::ProhibitComplexMappings] + +# Use 4-argument `substr' instead of writing `substr($foo, 2, 6) = $bar'. +[BuiltinFunctions::ProhibitLvalueSubstr] + +# Forbid $b before $a in sort blocks. +[BuiltinFunctions::ProhibitReverseSortBlock] + +# Use Time::HiRes instead of something like `select(undef, undef, undef, .05)'. +[BuiltinFunctions::ProhibitSleepViaSelect] + +# Write `eval { my $foo; bar($foo) }' instead of `eval "my $foo; bar($foo);"'. +[BuiltinFunctions::ProhibitStringyEval] + +# Write `split /-/, $string' instead of `split '-', $string'. +[BuiltinFunctions::ProhibitStringySplit] + +# Write `eval { $foo->can($name) }' instead of `UNIVERSAL::can($foo, $name)'. +[BuiltinFunctions::ProhibitUniversalCan] + +# Write `eval { $foo->isa($pkg) }' instead of `UNIVERSAL::isa($foo, $pkg)'. +[BuiltinFunctions::ProhibitUniversalIsa] +# this normally disables this policy! run with --severity 1 to get it +severity = 1 +# I'd really like to enable this, but it confuses Test::Deep::isa with +# UNIVERSAL::isa + +# Don't pass $_ to built-in functions that assume it, or to most filetest operators. +[BuiltinFunctions::ProhibitUselessTopic] + +# Don't use `grep' in void contexts. +[BuiltinFunctions::ProhibitVoidGrep] + +# Don't use `map' in void contexts. +# disabled because it gets confused with a map inside a hash constructor +[-BuiltinFunctions::ProhibitVoidMap] + +# Write `grep { /$pattern/ } @list' instead of `grep /$pattern/, @list'. +[BuiltinFunctions::RequireBlockGrep] + +# Write `map { /$pattern/ } @list' instead of `map /$pattern/, @list'. +[BuiltinFunctions::RequireBlockMap] + +# Use `glob q{*}' instead of <*>. +[BuiltinFunctions::RequireGlobFunction] + +# Sort blocks should have a single statement. +[BuiltinFunctions::RequireSimpleSortBlock] + +# AUTOLOAD methods should be avoided. +[ClassHierarchies::ProhibitAutoloading] + +# Employ `use base' instead of `@ISA'. +[ClassHierarchies::ProhibitExplicitISA] + +# Write `bless {}, $class;' instead of just `bless {};'. +[ClassHierarchies::ProhibitOneArgBless] + +# Use spaces instead of tabs. +[CodeLayout::ProhibitHardTabs] +allow_leading_tabs = 0 + +# Write `open $handle, $path' instead of `open($handle, $path)'. +[CodeLayout::ProhibitParensWithBuiltins] + +# Write `qw(foo bar baz)' instead of `('foo', 'bar', 'baz')'. +[CodeLayout::ProhibitQuotedWordLists] + +# Don't use whitespace at the end of lines. +[CodeLayout::ProhibitTrailingWhitespace] + +# Use the same newline through the source. +[CodeLayout::RequireConsistentNewlines] + +# Must run code through perltidy. +[-CodeLayout::RequireTidyCode] + +# Put a comma at the end of every multi-line list declaration, including the last one. +[CodeLayout::RequireTrailingCommas] + +# Write `for(0..20)' instead of `for($i=0; $i<=20; $i++)'. +[ControlStructures::ProhibitCStyleForLoops] + +# Don't write long "if-elsif-elsif-elsif-elsif...else" chains. +[ControlStructures::ProhibitCascadingIfElse] + +# Don't write deeply nested loops and conditionals. +[ControlStructures::ProhibitDeepNests] +max_nests = 5 + +# Don't use labels that are the same as the special block names. +[ControlStructures::ProhibitLabelsWithSpecialBlockNames] + +# Don't modify `$_' in list functions. +[ControlStructures::ProhibitMutatingListFunctions] + +# Don't use operators like `not', `!~', and `le' within `until' and `unless'. +[-ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions] + +# Write `if($condition){ do_something() }' instead of `do_something() if $condition'. +[-ControlStructures::ProhibitPostfixControls] + +# Write `if(! $condition)' instead of `unless($condition)'. +[-ControlStructures::ProhibitUnlessBlocks] + +# Don't write code after an unconditional `die, exit, or next'. +[ControlStructures::ProhibitUnreachableCode] + +# Write `while(! $condition)' instead of `until($condition)'. +[ControlStructures::ProhibitUntilBlocks] + +# Check your spelling. +[-Documentation::PodSpelling] + +# The `=head1 NAME' section should match the package. +[-Documentation::RequirePackageMatchesPodName] + +# All POD should be after `__END__'. +[-Documentation::RequirePodAtEnd] + +# Provide text to display with your pod links. +[-Documentation::RequirePodLinksIncludeText] + +# Organize your POD into the customary sections. +[-Documentation::RequirePodSections] + +# Use functions from Carp instead of `warn' or `die'. +[ErrorHandling::RequireCarping] + +# You can't depend upon the value of `$@'/`$EVAL_ERROR' to tell whether an `eval' failed. +[ErrorHandling::RequireCheckingReturnValueOfEval] + +# Discourage stuff like `@files = `ls $directory`'. +[InputOutput::ProhibitBacktickOperators] + +# Write `open my $fh, q{<}, $filename;' instead of `open FH, q{<}, $filename;'. +[InputOutput::ProhibitBarewordFileHandles] +severity = 2 + +# Use "<>" or "" or a prompting module instead of "". +[InputOutput::ProhibitExplicitStdin] + +# Use prompt() instead of -t. +[InputOutput::ProhibitInteractiveTest] + +# Use `local $/ = undef' or File::Slurp instead of joined readline. +[InputOutput::ProhibitJoinedReadline] + +# Never write `select($fh)'. +[InputOutput::ProhibitOneArgSelect] + +# Write `while( $line = <> ){...}' instead of `for(<>){...}'. +[InputOutput::ProhibitReadlineInForLoop] + +# Write `open $fh, q{<}, $filename;' instead of `open $fh, "<$filename";'. +[InputOutput::ProhibitTwoArgOpen] +severity = 2 + +# Write `print {$FH} $foo, $bar;' instead of `print $FH $foo, $bar;'. +[-InputOutput::RequireBracedFileHandleWithPrint] + +# Close filehandles as soon as possible after opening them. +[-InputOutput::RequireBriefOpen] + +# Write `my $error = close $fh;' instead of `close $fh;'. +[-InputOutput::RequireCheckedClose] + +# Write `my $error = open $fh, $mode, $filename;' instead of `open $fh, $mode, $filename;'. +[-InputOutput::RequireCheckedOpen] + +# Return value of flagged function ignored. +[-InputOutput::RequireCheckedSyscalls] + +# Write `open $fh, q{<:encoding(UTF-8)}, $filename;' instead of `open $fh, q{{<:utf8}, $filename;'. +[InputOutput::RequireEncodingWithUTF8Layer] + +# Do not use `format'. +[Miscellanea::ProhibitFormats] + +# Do not use `tie'. +[Miscellanea::ProhibitTies] + +# Forbid a bare `## no critic' +[Miscellanea::ProhibitUnrestrictedNoCritic] + +# Remove ineffective "## no critic" annotations. +[Miscellanea::ProhibitUselessNoCritic] + +# Export symbols via `@EXPORT_OK' or `%EXPORT_TAGS' instead of `@EXPORT'. +[Modules::ProhibitAutomaticExportation] + +# Avoid putting conditional logic around compile-time includes. +[Modules::ProhibitConditionalUseStatements] + +# Minimize complexity in code that is outside of subroutines. +[Modules::ProhibitExcessMainComplexity] +max_mccabe = 20 + +# Put packages (especially subclasses) in separate files. +[Modules::ProhibitMultiplePackages] +severity = 2 + +# Write `require Module' instead of `require 'Module.pm''. +[Modules::RequireBarewordIncludes] + +# End each module with an explicitly `1;' instead of some funky expression. +[Modules::RequireEndWithOne] + +# Always make the `package' explicit. +[Modules::RequireExplicitPackage] +# Don't require programs to contain a package statement. +exempt_scripts = 1 +allow_import_of = utf8 strict warnings + +# Package declaration must match filename. +[Modules::RequireFilenameMatchesPackage] + +# `use English' must be passed a `-no_match_vars' argument. +[Modules::RequireNoMatchVarsWithUseEnglish] + +# Give every module a `$VERSION' number. +[Modules::RequireVersionVar] + +# Distinguish different program components by case. +[NamingConventions::Capitalization] + +# Don't use vague variable or subroutine names like 'last' or 'record'. +[-NamingConventions::ProhibitAmbiguousNames] + +# Prohibit indirect object call syntax. +[Objects::ProhibitIndirectSyntax] +# Indirect method syntax is forbidden for these methods. +# Values that are always included: new. +# forbid = + +# Write `@{ $array_ref }' instead of `@$array_ref'. +[References::ProhibitDoubleSigils] + +# Capture variable used outside conditional. +[RegularExpressions::ProhibitCaptureWithoutTest] +# Names of ways to generate exceptions. +# Values that are always included: confess, croak, die. +# exception_source = + +# Split long regexps into smaller `qr//' chunks. +[-RegularExpressions::ProhibitComplexRegexes] + +# Use named character classes instead of explicit character lists. +[-RegularExpressions::ProhibitEnumeratedClasses] + +# Use character classes for literal meta-characters instead of escapes. +[-RegularExpressions::ProhibitEscapedMetacharacters] + +# Use `eq' or hash instead of fixed-pattern regexps. +[RegularExpressions::ProhibitFixedStringMatches] + +# Use `[abc]' instead of `a|b|c'. +[RegularExpressions::ProhibitSingleCharAlternation] + +# Only use a capturing group if you plan to use the captured value. +[RegularExpressions::ProhibitUnusedCapture] + +# Use only `//' or `{}' to delimit regexps. +[RegularExpressions::ProhibitUnusualDelimiters] +# In addition to allowing '{}', allow '()', '[]', and '{}'. +#allow_all_brackets = 1 + +# Don't use $_ to match against regexes. +[RegularExpressions::ProhibitUselessTopic] + +# Use `{' and `}' to delimit multi-line regexps. +[RegularExpressions::RequireBracesForMultiline] +# In addition to allowing '{}', allow '()', '[]', and '{}'. +#allow_all_brackets = 1 + +# Always use the `/s' modifier with regular expressions. +[-RegularExpressions::RequireDotMatchAnything] + +# Always use the `/x' modifier with regular expressions. +[-RegularExpressions::RequireExtendedFormatting] + +# Always use the `/m' modifier with regular expressions. +[-RegularExpressions::RequireLineBoundaryMatching] + +# Don't call functions with a leading ampersand sigil. +[Subroutines::ProhibitAmpersandSigils] + +# Don't declare your own `open' function. +[Subroutines::ProhibitBuiltinHomonyms] + +# Minimize complexity by factoring code into smaller subroutines. +[Subroutines::ProhibitExcessComplexity] + +# Return failure with bare `return' instead of `return undef'. +[-Subroutines::ProhibitExplicitReturnUndef] + +# Too many arguments. +[Subroutines::ProhibitManyArgs] + +# `sub never { sub correct {} }'. +[Subroutines::ProhibitNestedSubs] + +# Behavior of `sort' is not defined if called in scalar context. +[Subroutines::ProhibitReturnSort] + +# Don't write `sub my_function (@@) {}'. +[Subroutines::ProhibitSubroutinePrototypes] +severity = 2 + +# Prevent unused private subroutines. +[Subroutines::ProhibitUnusedPrivateSubroutines] + +# Prevent access to private subs in other packages. +[Subroutines::ProtectPrivateSubs] + +# Always unpack `@_' first. +[-Subroutines::RequireArgUnpacking] + +# End every path through a subroutine with an explicit `return' statement. +[Subroutines::RequireFinalReturn] +# this normally disables this policy! run with --severity 1 to get it +severity = 1 +# I'd really like to enable this, but we very often have +# single-expression subs, and this policy would warn on every one of +# them... maybe one day I'll patch the policy + +# Prohibit various flavors of `no strict'. +[TestingAndDebugging::ProhibitNoStrict] + +# Prohibit various flavors of `no warnings'. +[TestingAndDebugging::ProhibitNoWarnings] +allow = uninitialized numeric redefine + +# Don't turn off strict for large blocks of code. +[TestingAndDebugging::ProhibitProlongedStrictureOverride] +# The maximum number of statements in a no strict block. +statements = 10 + +# Tests should all have labels. +[TestingAndDebugging::RequireTestLabels] + +# Always `use strict'. +[TestingAndDebugging::RequireUseStrict] + +# Always `use warnings'. +[TestingAndDebugging::RequireUseWarnings] + +# Don't use the comma operator as a statement separator. +[ValuesAndExpressions::ProhibitCommaSeparatedStatements] +# this normally disables this policy! run with --severity 1 to get it +severity = 1 +# I'd like to enable this, but it complains about arglists built with +# ternary operators + +# Prohibit version values from outside the module. +[ValuesAndExpressions::ProhibitComplexVersion] + +# Don't `use constant FOO => 15'. +[ValuesAndExpressions::ProhibitConstantPragma] + +# Write `q{}' instead of `'''. +[-ValuesAndExpressions::ProhibitEmptyQuotes] + +# Write `"\N{DELETE}"' instead of `"\x7F"', etc. +[-ValuesAndExpressions::ProhibitEscapedCharacters] + +# Use concatenation or HEREDOCs instead of literal line breaks in strings. +[ValuesAndExpressions::ProhibitImplicitNewlines] + +# Always use single quotes for literal strings. +[ValuesAndExpressions::ProhibitInterpolationOfLiterals] + +# Write `oct(755)' instead of `0755'. +[ValuesAndExpressions::ProhibitLeadingZeros] + +# Long chains of method calls indicate tightly coupled code. +[-ValuesAndExpressions::ProhibitLongChainsOfMethodCalls] + +# Don't use values that don't explain themselves. +[-ValuesAndExpressions::ProhibitMagicNumbers] + +# Don't mix numeric operators with string operands, or vice-versa. +[ValuesAndExpressions::ProhibitMismatchedOperators] + +# Write ` !$foo && $bar || $baz ' instead of ` not $foo && $bar or $baz'. +[ValuesAndExpressions::ProhibitMixedBooleanOperators] + +# Use `q{}' or `qq{}' instead of quotes for awkward-looking strings. +[ValuesAndExpressions::ProhibitNoisyQuotes] + +# Don't use quotes (`'', `"', ``') as delimiters for the quote-like operators. +[ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters] + +# Don't write ` print <<'__END__' '. +[ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator] + +# Don't use strings like `v1.4' or `1.4.5' when including other modules. +[ValuesAndExpressions::ProhibitVersionStrings] + +# Require $VERSION to be a constant rather than a computed value. +[ValuesAndExpressions::RequireConstantVersion] + +# Warns that you might have used single quotes when you really wanted double-quotes. +[-ValuesAndExpressions::RequireInterpolationOfMetachars] + +# Write ` 141_234_397.0145 ' instead of ` 141234397.0145 '. +[-ValuesAndExpressions::RequireNumberSeparators] + +# Write ` print <<'THE_END' ' or ` print <<"THE_END" '. +[ValuesAndExpressions::RequireQuotedHeredocTerminator] + +# Write ` <<'THE_END'; ' instead of ` <<'theEnd'; '. +[ValuesAndExpressions::RequireUpperCaseHeredocTerminator] + +# Do not write ` my $foo .= 'bar'; '. +[-Variables::ProhibitAugmentedAssignmentInDeclaration] + +# Do not write ` my $foo = $bar if $baz; '. +[Variables::ProhibitConditionalDeclarations] + +# Use `my' instead of `local', except when you have to. +[-Variables::ProhibitLocalVars] + +# Avoid `$`', `$&', `$'' and their English equivalents. +[Variables::ProhibitMatchVars] + +# Eliminate globals declared with `our' or `use vars'. +[Variables::ProhibitPackageVars] + +# Use double colon (::) to separate package name components instead of single quotes ('). +[Variables::ProhibitPerl4PackageNames] + +# Write `$EVAL_ERROR' instead of `$@'. +[-Variables::ProhibitPunctuationVars] + +# Do not reuse a variable name in a lexical scope +[Variables::ProhibitReusedNames] + +# Don't ask for storage you don't need. +[Variables::ProhibitUnusedVariables] + +# Prevent access to private vars in other packages. +[Variables::ProtectPrivateVars] + +# Write `local $foo = $bar;' instead of just `local $foo;'. +[-Variables::RequireInitializationForLocalVars] + +# Write `for my $element (@list) {...}' instead of `for $element (@list) {...}'. +[Variables::RequireLexicalLoopIterators] + +# Magic variables should be assigned as "local". +[Variables::RequireLocalizedPunctuationVars] +allow = %ENV + +# Negative array index should be used. +[Variables::RequireNegativeIndices] -- cgit v1.2.3 From dbc1810fa58663c2fe1a439adce7b333b67e4621 Mon Sep 17 00:00:00 2001 From: dakkar Date: Mon, 29 Aug 2016 15:36:18 +0100 Subject: add Pod::Elemental::Transformer::List as authordep adding it as a comment seems to be the only way to get it recognised, Dist::Zilla::App::Command::authordeps documents the syntax --- dist.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/dist.ini b/dist.ini index 09f7b6c..6081f49 100644 --- a/dist.ini +++ b/dist.ini @@ -6,6 +6,7 @@ copyright_year = 2015 [GatherDir] [PodWeaver] +; authordep Pod::Elemental::Transformer::List [PruneCruft] -- cgit v1.2.3 From 4eaf5348229be29550429422eaefd70b9f550c90 Mon Sep 17 00:00:00 2001 From: dakkar Date: Tue, 7 Feb 2017 20:03:30 +0000 Subject: more auto-sections in PODs required and modified methods for roles, types for type libraries --- weaver.ini | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/weaver.ini b/weaver.ini index 4cf1cae..f4c9077 100644 --- a/weaver.ini +++ b/weaver.ini @@ -14,12 +14,21 @@ [Collect / ATTRIBUTES] command = attr +[Collect / REQUIRED METHODS] +command = require + [Collect / METHODS] command = method +[Collect / MODIFIED METHODS] +command = modif + [Collect / FUNCTIONS] command = func +[Collect / TYPES] +command = type + [Leftovers] [Region / postlude] -- cgit v1.2.3 From d2180e208f9d221dbfffb6a694742fe0f0a115c9 Mon Sep 17 00:00:00 2001 From: dakkar Date: Tue, 7 Feb 2017 20:05:29 +0000 Subject: don't consider Moo(se)'s _build_* unused actually, we're telling the policy to not consider them private, but the effect is the same --- perlcritic.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/perlcritic.rc b/perlcritic.rc index 651ba52..7bfe7a1 100644 --- a/perlcritic.rc +++ b/perlcritic.rc @@ -319,6 +319,7 @@ severity = 2 # Prevent unused private subroutines. [Subroutines::ProhibitUnusedPrivateSubroutines] +private_name_regex = _(?!build_)\w+ # Prevent access to private subs in other packages. [Subroutines::ProtectPrivateSubs] -- cgit v1.2.3 From a22e35ff1cca4d4500b457f92dae5e21fd357f4d Mon Sep 17 00:00:00 2001 From: dakkar Date: Tue, 7 Feb 2017 20:06:05 +0000 Subject: bump copyright year --- dist.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist.ini b/dist.ini index 6081f49..578ca55 100644 --- a/dist.ini +++ b/dist.ini @@ -1,7 +1,7 @@ author = Gianni Ceccarelli license = Perl_5 copyright_holder = Gianni Ceccarelli -copyright_year = 2015 +copyright_year = 2017 [GatherDir] -- cgit v1.2.3 From 4837d0655c527b97b985b27b8c3d723ec09f36df Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Thu, 21 Dec 2017 15:53:50 +0000 Subject: add pod spelling test --- dist.ini | 2 ++ weaver.ini | 3 +++ 2 files changed, 5 insertions(+) diff --git a/dist.ini b/dist.ini index 578ca55..2223c6e 100644 --- a/dist.ini +++ b/dist.ini @@ -39,6 +39,8 @@ first_version = 0.0.1 [PodSyntaxTests] +[Test::PodSpelling] + [ExtraTests] [Repository] diff --git a/weaver.ini b/weaver.ini index f4c9077..d63e1b0 100644 --- a/weaver.ini +++ b/weaver.ini @@ -2,6 +2,9 @@ [-SingleEncoding] +[Region / stopwords] +flatten = 0 + [Name] [Version] -- cgit v1.2.3 From b2c107e1d9136f84819751a275cf157ce0e00d04 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Thu, 21 Dec 2017 15:53:58 +0000 Subject: use newer pod coverage test plugin --- dist.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist.ini b/dist.ini index 2223c6e..a6dc5e0 100644 --- a/dist.ini +++ b/dist.ini @@ -35,7 +35,7 @@ first_version = 0.0.1 [Test::Perl::Critic] -[PodCoverageTests] +[Test::Pod::Coverage::Configurable] [PodSyntaxTests] -- cgit v1.2.3 From 4eda88018737ab10f09dcdcc044ddf975fa8b258 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Thu, 21 Dec 2017 15:54:11 +0000 Subject: weaver collect DBIC shortcuts --- weaver.ini | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/weaver.ini b/weaver.ini index d63e1b0..2a9dfc0 100644 --- a/weaver.ini +++ b/weaver.ini @@ -17,6 +17,12 @@ flatten = 0 [Collect / ATTRIBUTES] command = attr +[Collect / COLUMNS] +command = column + +[Collect / RELATIONSHIPS] +command = rel + [Collect / REQUIRED METHODS] command = require -- cgit v1.2.3 From 6d7887640ba60baed66a9b13e9ecec6f8df17ef5 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Thu, 21 Dec 2017 15:54:21 +0000 Subject: whitespace --- dist.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/dist.ini b/dist.ini index a6dc5e0..3df5ed6 100644 --- a/dist.ini +++ b/dist.ini @@ -81,4 +81,5 @@ branch = release/master tag_format = v%v%t [ConfirmRelease] + [UploadToCPAN] -- cgit v1.2.3 From 8a03fbb08906b3923dd87573ad9261298142a97b Mon Sep 17 00:00:00 2001 From: dakkar Date: Fri, 13 Jul 2018 11:49:32 +0100 Subject: bump year --- dist.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist.ini b/dist.ini index 3df5ed6..5afd394 100644 --- a/dist.ini +++ b/dist.ini @@ -1,7 +1,7 @@ author = Gianni Ceccarelli license = Perl_5 copyright_holder = Gianni Ceccarelli -copyright_year = 2017 +copyright_year = 2018 [GatherDir] -- cgit v1.2.3