fix travis/check-spelling.pl for updated API
This commit is contained in:
parent
eada44be1e
commit
b3d4281b8b
@ -11,6 +11,7 @@ use warnings;
|
||||
use v5.10;
|
||||
use autodie;
|
||||
use lib 'testcases/lib';
|
||||
use lib '/usr/share/lintian/lib';
|
||||
use i3test::Util qw(slurp);
|
||||
use Lintian::Spelling qw(check_spelling);
|
||||
|
||||
@ -21,8 +22,6 @@ use Lintian::Profile;
|
||||
my $profile = Lintian::Profile->new;
|
||||
$profile->load('debian', ['/usr/share/lintian']);
|
||||
|
||||
Lintian::Data->set_vendor($profile);
|
||||
|
||||
my $exitcode = 0;
|
||||
|
||||
# Whitelist for spelling errors in manpages, in case the spell checker has
|
||||
@ -42,7 +41,7 @@ my @binaries = qw(
|
||||
build/i3bar
|
||||
);
|
||||
for my $binary (@binaries) {
|
||||
check_spelling(slurp($binary), $binary_spelling_exceptions, sub {
|
||||
check_spelling($profile, slurp($binary), $binary_spelling_exceptions, sub {
|
||||
my ($current, $fixed) = @_;
|
||||
say STDERR qq|Binary "$binary" contains a spelling error: "$current" should be "$fixed"|;
|
||||
$exitcode = 1;
|
||||
@ -57,7 +56,7 @@ my $manpage_spelling_exceptions = {
|
||||
for my $name (glob('build/man/*.1')) {
|
||||
for my $line (split(/\n/, slurp($name))) {
|
||||
next if $line =~ /^\.\\\"/o;
|
||||
check_spelling($line, $manpage_spelling_exceptions, sub {
|
||||
check_spelling($profile, $line, $manpage_spelling_exceptions, sub {
|
||||
my ($current, $fixed) = @_;
|
||||
say STDERR qq|Manpage "$name" contains a spelling error: "$current" should be "$fixed"|;
|
||||
$exitcode = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user