Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
fix travis/check-spelling.pl for updated API
  • Loading branch information
stapelberg committed Oct 6, 2021
1 parent eada44b commit b3d4281
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions travis/check-spelling.pl
Expand Up @@ -11,6 +11,7 @@
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);

Expand All @@ -21,8 +22,6 @@
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
Expand All @@ -42,7 +41,7 @@
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;
Expand All @@ -57,7 +56,7 @@
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;
Expand Down

0 comments on commit b3d4281

Please sign in to comment.