.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Lintian::Spelling 3" .TH Lintian::Spelling 3 2024-02-05 "Lintian v2.117.0" "Debian Package Checker" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Lintian::Spelling \-\- Lintian spell checks shared between multiple scripts .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Lintian::Spelling qw(check_spelling); .Ve .SH DESCRIPTION .IX Header "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. .PP 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. .SH FUNCTIONS .IX Header "FUNCTIONS" .IP "check_spelling(TEXT,[ EXCEPTIONS,] CODEREF)" 4 .IX Item "check_spelling(TEXT,[ EXCEPTIONS,] CODEREF)" Performs a spelling check of TEXT. Call CODEREF once for each unique misspelling with the following arguments: .RS 4 .IP "The misspelled word/phrase" 4 .IX Item "The misspelled word/phrase" .PD 0 .IP "The correct word/phrase" 4 .IX Item "The correct word/phrase" .RE .RS 4 .PD .Sp If EXCEPTIONS is given, it will be used as an array ref of exceptions. Any lowercase word appearing as a key of that array will never be considered a spelling mistake (exception being if it is a part of a multiword misspelling). .Sp Returns the number of spelling mistakes found in TEXT. .RE .IP "check_spelling_picky(TEXT, CODEREF)" 4 .IX Item "check_spelling_picky(TEXT, CODEREF)" Performs a spelling check of TEXT. Call CODEREF once for each unique misspelling with the following arguments: .RS 4 .IP "The misspelled word/phrase" 4 .IX Item "The misspelled word/phrase" .PD 0 .IP "The correct word/phrase" 4 .IX Item "The correct word/phrase" .RE .RS 4 .PD .Sp 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. .Sp Returns the number of spelling mistakes found in TEXT. .RE .SH AUTHOR .IX Header "AUTHOR" Originally written by Russ Allbery for Lintian. Based on code from checks scripts by Marc Brockschmidt and Richard Braakman. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBlintian\fR\|(1)