diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-09-09 11:01:05 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-09-09 11:01:15 -0400 |
commit | 7611b40b746550fc9ef8d13a6f64741f04e7627e (patch) | |
tree | 54fd179638008196da7966ccc2528861513c2fd6 /bin | |
parent | f262ec0d2b7a7ae0f99150d450273943723fd2e3 (diff) | |
download | conf-7611b40b746550fc9ef8d13a6f64741f04e7627e.tar.gz conf-7611b40b746550fc9ef8d13a6f64741f04e7627e.zip |
couple more lint checks
Diffstat (limited to 'bin')
-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 { |