App-GitHooks-Plugin-ValidateChangelogFormat
view release on metacpan or search on metacpan
lib/App/GitHooks/Plugin/ValidateChangelogFormat.pm view on Meta::CPAN
package App::GitHooks::Plugin::ValidateChangelogFormat;
use strict;
use warnings;
use base 'App::GitHooks::Plugin';
# Internal dependencies.
use App::GitHooks::Constants qw( :PLUGIN_RETURN_CODES );
# External dependencies.
use CPAN::Changes;
use Try::Tiny;
use version qw();
=head1 NAME
App::GitHooks::Plugin::ValidateChangelogFormat - Validate the format of changelog files.
=head1 DESCRIPTION
This plugin verifies that the changes log conforms to the specifications
outlined in C<CPAN::Changes::Spec>.
=head1 VERSION
Version 1.1.0
=cut
our $VERSION = '1.1.0';
=head1 CONFIGURATION OPTIONS
This plugin supports the following options in the C<[ValidateChangelogFormat]>
section of your C<.githooksrc> file.
[ValidateChangelogFormat]
version_format_regex = /^v\d+\.\d+\.\d+$/
date_format_regex = /^\d{4}-\d{2}-\d{2}$/
=head2 version_format_regex
A regular expression that will be checked against the version number for each
release listed in the change log.
version_format_regex = /^v\d+\.\d+\.\d+$/
By default, this plugin allows the versioning schemes described in
L<CPAN::Meta::Spec/Version-Formats>.
=head2 date_format_regex
A regular expression that will be checked against the date for each release
listed in the change log.
date_format_regex = /^\d{4}-\d{2}-\d{2}$/
By default, this plugin allows the date formats listed in
L<CPAN::Changes::Spec/Date>.
=head1 METHODS
=head2 get_file_pattern()
Return a pattern to filter the files this plugin should analyze.
( run in 1.100 second using v1.01-cache-2.11-cpan-39bf76dae61 )