diff options
Diffstat (limited to 'bin/lint-dist')
-rwxr-xr-x | bin/lint-dist | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/bin/lint-dist b/bin/lint-dist index 50515df..12f7f00 100755 --- a/bin/lint-dist +++ b/bin/lint-dist @@ -176,6 +176,15 @@ my @checks = ( [ sub { 1 }, sub { + grep { $_->get_content =~ m{use_ok} } + grep { $_->has_content && $_->name =~ /\.t$/ } + $_[0]->tar->get_files + }, + "uses use_ok" + ], + [ + sub { 1 }, + sub { my %allowed = map { $_ => 1 } qw( 00-compile.t ); @@ -333,6 +342,24 @@ my @checks = ( }, "repository has unreleased changes" ], + [ + sub { $_[0]->has_github_data && $_[0]->repo_has_file('.travis.yml') }, + sub { + my $gh = $_[0]->github_data; + # XXX not sure how to get the current status for a specific branch + # other than from the status image + my $url = + "https://travis-ci.org/$gh->{full_name}.png" + . "?branch=$gh->{default_branch}"; + my $res = HTTP::Tiny->new->get($url); + die "couldn't get data for $url ($res->{status}): $res->{content}" + unless $res->{success}; + + require Digest::MD5; + Digest::MD5::md5_hex($res->{content}) ne '6df8b0d6154a26601b9a3ef1c9662de7'; + }, + sub { "travis isn't passing" } + ], ); package Dist::To::Lint { |