Lintian::Spelling (3) - Linux Manuals

Lintian::Spelling: Lintian spell checks shared between multiple scripts

NAME

Lintian::Spelling -- Lintian spell checks shared between multiple scripts

SYNOPSIS

    use Lintian::Spelling qw(check_spelling);

DESCRIPTION

This module provides functions to do some Lintian checks that need to be done in multiple places. There are certain low-level checks, such as validating a maintainer name and e-mail address or checking spelling, which apply in multiple situations and should be done in multiple checks scripts or in checks scripts and the Lintian front-end.

The functions provided by this module issue tags directly, usually either taking the tag name to issue as an argument or dynamically constructing the tag name based on function parameters. The caller is responsible for ensuring that all tags are declared in the relevant *.desc file with proper descriptions and other metadata. The possible tags issued by each function are described in the documentation for that function.

FUNCTIONS

check_spelling(TEXT,[ EXCEPTIONS,] CODEREF)
Performs a spelling check of TEXT. Call CODEREF once for each unique misspelling with the following arguments:
The misspelled word/phrase
The correct word/phrase

If EXCEPTIONS is given, it will be used as a hash ref of exceptions. Any lowercase word appearing as a key of this hash ref will never be considered a spelling mistake (exception being if it is a part of a multiword misspelling).

Returns the number of spelling mistakes found in TEXT.

check_spelling_picky(TEXT, CODEREF)
Performs a spelling check of TEXT. Call CODEREF once for each unique misspelling with the following arguments:
The misspelled word/phrase
The correct word/phrase

This method performs some pickier corrections - such as checking for common capitalization mistakes - which would are not included in check_spelling as they are not appropriate for some files, such as changelogs.

Returns the number of spelling mistakes found in TEXT.

VARIABLES

$known_shells_regex
Regular expression that matches names of any known shell.

AUTHOR

Originally written by Russ Allbery <rra [at] debian.org> for Lintian. Based on code from checks scripts by Marc Brockschmidt and Richard Braakman.

SEE ALSO

lintian(1)