Lintian::Spelling(3)

✨ NAME ✨

Lintian::Spelling β€” the Lintian spell-check brain cell that all the scripts share, bestie πŸ’…

Like, it's literally Lintian::Spelling(3), living in the Debian Package Checker manual, and it's the module the other Lintian scripts pass around like a communal lip gloss πŸŽ€


🌸 SYNOPSIS 🌸

use Lintian::Spelling qw(check_spelling);

That's it. That's the vibe check. πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

Okay so this module hands out functions for the Lintian checks that, like, have to happen in multiple places and nobody wants to write them twice. There are certain low-level checks β€” validating a maintainer name and e-mail address, checking spelling, that whole genre β€” that apply in multiple situations, and honestly they should be done in multiple checks scripts or in checks scripts and the Lintian front-end. So. Here we are. ✨

The functions this module gives you issue tags directly, which is very main character of them πŸ‘‘ Usually that means either they take the tag name to issue as an argument, or they dynamically construct the tag name based on the function parameters. Either way: the caller is responsible for making sure that all those tags are declared in the relevant *.desc file, with proper descriptions and other metadata. No cap, that part is on you πŸ™ˆ

The possible tags issued by each function? Described in the documentation for that function. Read on, bestie 🫢


πŸŽ€ FUNCTIONS πŸŽ€

  • check_spelling(TEXT,[ EXCEPTIONS,] CODEREF) β€” does a spelling check of TEXT. It calls CODEREF once for each unique misspelling, handing it these arguments:
    • The misspelled word/phrase
    • The correct word/phrase

If EXCEPTIONS is given, it gets 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. (Yes, that's the actual rule, don't come for me 🫠)

Returns the number of spelling mistakes found in TEXT. Iconic little counter behavior, we love a return value πŸ’…

  • check_spelling_picky(TEXT, CODEREF) β€” also does a spelling check of TEXT, and calls CODEREF once for each unique misspelling with these arguments:
    • The misspelled word/phrase
    • The correct word/phrase

This method does some pickier corrections β€” stuff like checking for common capitalization mistakes β€” which would are not included in check_spelling as they are not appropriate for some files, such as changelogs. (She's selective. She has standards. πŸ’€)

Returns the number of spelling mistakes found in TEXT.


🌈 AUTHOR 🌈

Originally written by Russ Allbery <rra@debian.org> for Lintian. Based on code from checks scripts by Marc Brockschmidt and Richard Braakman. Immaculate lineage honestly 🧚


⭐ SEE ALSO ⭐


And that's the whole page, babe β€” brought to you by Lintian v2.139.0ubuntu2, dated 2026-10-08, and also by the fact that I will simply never stop being obsessed with good spelling βœ¨πŸ¦‹πŸ’–

πŸ“¦ where this page comes from