Lintian::Tag::Info - Lintian interface to tag metadata
my $cs = Lintian::CheckScript->new ("$ENV{'LINTIAN_ROOT'}/checks/", 'files'); my $tag_info = $cs->get_tag ('some-tag'); print "Tag info is:\n"; print $tag_info->description('text', ' '); print "\nTag info in HTML is:\n"; print $tag_info->description('html', ' ');
This module provides an interface to tag metadata as gleaned from the *.desc files describing the checks. It can be used to retrieve specific metadata elements or to format the tag description.
Loads a tag description from PATH.
Returns the one-letter code for the tag. This will be a letter chosen from E
, W
, I
, or P
, based on the tag severity, certainty, and other attributes (such as whether experimental is set). This code will never be O
or X
; overrides and experimental tags are handled separately.
Returns the formatted description (the Info field) for a tag. FORMAT must be either text
or html
and defaults to text
if no format is specified. If text
, returns wrapped paragraphs formatted in plain text with a right margin matching the Text::Wrap default, preserving as verbatim paragraphs that begin with whitespace. If html
, return paragraphs formatted in HTML.
If INDENT is specified, the string INDENT is prepended to each line of the formatted output.
Returns the severity of the tag; if $original is a truth value the original severity is returned, otherwise the effective severity is returned.
Returns, as a list, the keywords for the sources of this tag from the references header. This is only the top-level source, not any more-specific section or chapter.
Originally written by Russ Allbery <rra@debian.org> for Lintian.
lintian(1)