fix travis/check-spelling.pl for recent Lintian changes
This commit is contained in:
committed by
Michael Stapelberg
parent
ddc587933d
commit
103dc7b55d
@@ -26,11 +26,12 @@ my $exitcode = 0;
|
|||||||
|
|
||||||
# Whitelist for spelling errors in manpages, in case the spell checker has
|
# Whitelist for spelling errors in manpages, in case the spell checker has
|
||||||
# false-positives.
|
# false-positives.
|
||||||
my $binary_spelling_exceptions = {
|
my $binary_spelling_exceptions = [
|
||||||
#'exmaple' => 1, # Example for how to add entries to this whitelist.
|
#'exmaple', # Example for how to add entries to this whitelist.
|
||||||
'betwen' => 1, # asan_flags.inc contains this spelling error.
|
'betwen', # asan_flags.inc contains this spelling error.
|
||||||
'dissassemble' => 1, # https://reviews.llvm.org/D93902
|
'dissassemble', # https://reviews.llvm.org/D93902
|
||||||
};
|
'oT', # lintian finds this in build/i3bar when built with clang?!
|
||||||
|
];
|
||||||
my @binaries = qw(
|
my @binaries = qw(
|
||||||
build/i3
|
build/i3
|
||||||
build/i3-config-wizard
|
build/i3-config-wizard
|
||||||
@@ -41,7 +42,7 @@ my @binaries = qw(
|
|||||||
build/i3bar
|
build/i3bar
|
||||||
);
|
);
|
||||||
for my $binary (@binaries) {
|
for my $binary (@binaries) {
|
||||||
check_spelling($profile, slurp($binary), $binary_spelling_exceptions, sub {
|
check_spelling($profile->data, slurp($binary), $binary_spelling_exceptions, sub {
|
||||||
my ($current, $fixed) = @_;
|
my ($current, $fixed) = @_;
|
||||||
say STDERR qq|Binary "$binary" contains a spelling error: "$current" should be "$fixed"|;
|
say STDERR qq|Binary "$binary" contains a spelling error: "$current" should be "$fixed"|;
|
||||||
$exitcode = 1;
|
$exitcode = 1;
|
||||||
@@ -50,13 +51,13 @@ for my $binary (@binaries) {
|
|||||||
|
|
||||||
# Whitelist for spelling errors in manpages, in case the spell checker has
|
# Whitelist for spelling errors in manpages, in case the spell checker has
|
||||||
# false-positives.
|
# false-positives.
|
||||||
my $manpage_spelling_exceptions = {
|
my $manpage_spelling_exceptions = [
|
||||||
};
|
];
|
||||||
|
|
||||||
for my $name (glob('build/man/*.1')) {
|
for my $name (glob('build/man/*.1')) {
|
||||||
for my $line (split(/\n/, slurp($name))) {
|
for my $line (split(/\n/, slurp($name))) {
|
||||||
next if $line =~ /^\.\\\"/o;
|
next if $line =~ /^\.\\\"/o;
|
||||||
check_spelling($profile, $line, $manpage_spelling_exceptions, sub {
|
check_spelling($profile->data, $line, $manpage_spelling_exceptions, sub {
|
||||||
my ($current, $fixed) = @_;
|
my ($current, $fixed) = @_;
|
||||||
say STDERR qq|Manpage "$name" contains a spelling error: "$current" should be "$fixed"|;
|
say STDERR qq|Manpage "$name" contains a spelling error: "$current" should be "$fixed"|;
|
||||||
$exitcode = 1;
|
$exitcode = 1;
|
||||||
|
Reference in New Issue
Block a user