.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Lintian::Tags 3" .TH Lintian::Tags 3 "2020-02-26" "Lintian v2.55.0~bpo10+1" "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::Tags \- Manipulate and output Lintian tags .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 10 \& my $tags = Lintian::Tags\->new; \& my $proc = Lintian::Processable\->new; \& $proc\->init_from_file(\*(Aq/path/to/file\*(Aq); \& $tags\->file_start ($proc); \& $tags\->file_overrides (\*(Aq/path/to/an/overrides\-file\*(Aq); \& $tags\->tag (\*(Aqlintian\-tag\*(Aq, \*(Aqextra tag information\*(Aq); \& tag (\*(Aqother\-lintian\-tag\*(Aq, \*(Aqwith some extra data\*(Aq); \& tag (\*(Aqthird\-lintian\-tag\*(Aq); # with no extra). \& my %overrides = $tags\->overrides ($proc); \& my %stats = $tags\->statistics; \& if ($tags\->displayed (\*(Aqlintian\-tag\*(Aq)) { \& # do something if that tag would be displayed... \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module stores metadata about Lintian tags, stores configuration about which tags should be displayed, handles displaying tags if appropriate, and stores cumulative statistics about what tags have been seen. It also accepts override information and determines whether a tag has been overridden, keeping override statistics. Finally, it supports answering metadata questions about Lintian tags, such as what references Lintian has for that tag. .PP Each Lintian::Tags object has its own tag list, file list, and associated statistics. Separate Lintian::Tags objects can be maintained and used independently. However, as a convenience for Lintian's most typical use case and for backward compatibility, the first created Lintian::Tags object is maintained as a global default. The \fBtag()\fR method can be called as a global function instead of a method, in which case it will act on that global default Lintian::Tags object. .SH "CLASS METHODS" .IX Header "CLASS METHODS" .IP "\fBnew()\fR" 4 .IX Item "new()" Creates a new Lintian::Tags object, initializes all of its internal statistics and configuration to the defaults, and returns the newly created object. .IP "tag(\s-1TAG,\s0 [\s-1EXTRA, ...\s0])" 4 .IX Item "tag(TAG, [EXTRA, ...])" Issue the Lintian tag \s-1TAG,\s0 possibly suppressing it or not displaying it based on configuration. \s-1EXTRA,\s0 if present, is additional information to display with the tag. It can be given as a list of strings, in which case they're joined by a single space before display. .Sp This method can be called either as a class method (which is exported by the Lintian::Tags module) or as an instance method. If called as a class method, it uses the first-constructed Lintian::Tags object as its underlying object. .Sp This method throws an exception if it is called without \fBfile_start()\fR being called first or if an attempt is made to issue an unknown tag. .SH "INSTANCE METHODS" .IX Header "INSTANCE METHODS" .SS "Configuration" .IX Subsection "Configuration" .IP "display(\s-1OPERATION, RELATION, SEVERITY, CERTAINTY\s0)" 4 .IX Item "display(OPERATION, RELATION, SEVERITY, CERTAINTY)" Configure which tags are displayed by severity and certainty. \s-1OPERATION\s0 is \f(CW\*(C`+\*(C'\fR to display the indicated tags, \f(CW\*(C`\-\*(C'\fR to not display the indicated tags, or \f(CW\*(C`=\*(C'\fR to not display any tags except the indicated ones. \s-1RELATION\s0 is one of \f(CW\*(C`<\*(C'\fR, \f(CW\*(C`<=\*(C'\fR, \f(CW\*(C`=\*(C'\fR, \f(CW\*(C`>=\*(C'\fR, or \f(CW\*(C`>\*(C'\fR. The \&\s-1OPERATION\s0 will be applied to all pairs of severity and certainty that match the given \s-1RELATION\s0 on the \s-1SEVERITY\s0 and \s-1CERTAINTY\s0 arguments. If either of those arguments are undefined, the action applies to any value for that variable. For example: .Sp .Vb 1 \& $tags\->display(\*(Aq=\*(Aq, \*(Aq>=\*(Aq, \*(Aqimportant\*(Aq); .Ve .Sp turns off display of all tags and then enables display of any tag (with any certainty) of severity important or higher. .Sp .Vb 1 \& $tags\->display(\*(Aq+\*(Aq, \*(Aq>\*(Aq, \*(Aqnormal\*(Aq, \*(Aqpossible\*(Aq); .Ve .Sp adds to the current configuration display of all tags with a severity higher than normal and a certainty higher than possible (so important/certain and serious/certain). .Sp .Vb 1 \& $tags\->display(\*(Aq\-\*(Aq, \*(Aq=\*(Aq, \*(Aqminor\*(Aq, \*(Aqpossible\*(Aq); .Ve .Sp turns off display of tags of severity minor and certainty possible. .Sp This method throws an exception on errors, such as an unknown severity or certainty or an impossible constraint (like \f(CW\*(C`> serious\*(C'\fR). .IP "show_experimental(\s-1BOOL\s0)" 4 .IX Item "show_experimental(BOOL)" If \s-1BOOL\s0 is true, configure experimental tags to be shown. If \s-1BOOL\s0 is false, configure experimental tags to not be shown. .IP "show_overrides(\s-1BOOL\s0)" 4 .IX Item "show_overrides(BOOL)" If \s-1BOOL\s0 is true, configure overridden tags to be shown. If \s-1BOOL\s0 is false, configure overridden tags to not be shown. .IP "sources([\s-1SOURCE\s0 [, ...]])" 4 .IX Item "sources([SOURCE [, ...]])" Limits the displayed tags to only those from the listed sources. One or more sources may be given. If no sources are given, resets the Lintian::Tags object to display tags from any source. Tag sources are the names of references from the Ref metadata for the tags. .IP "profile(\s-1PROFILE\s0)" 4 .IX Item "profile(PROFILE)" Use the \s-1PROFILE\s0 (Lintian::Profile) to determine which tags are suppressed, the severity of the tags and which tags are non-overridable. .SS "Tag Reporting" .IX Subsection "Tag Reporting" .IP "displayed(\s-1TAG\s0)" 4 .IX Item "displayed(TAG)" Returns true if the given tag would be displayed given the current configuration, false otherwise. This does not check overrides, only whether the tag severity, certainty, and source warrants display given the configuration. .IP "suppressed(\s-1TAG\s0)" 4 .IX Item "suppressed(TAG)" Returns true if the given tag would be suppressed given the current configuration, false otherwise. This is different than \fBdisplayed()\fR in that a tag is only suppressed if Lintian treats the tag as if it's never been seen, doesn't update statistics, and doesn't change its exit status. Tags are suppressed via \fBprofile()\fR. .SH "AUTHOR" .IX Header "AUTHOR" Originally written by Russ Allbery for Lintian. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBlintian\fR\|(1), \fBLintian::Tag::Info\fR\|(3)