Provided by: lintian_2.22.0_all bug


       Lintian::CheckScript - Check script meta data


        use Lintian::CheckScript;

        my $cs = Lintian::CheckScript->new ("$ENV{'LINTIAN_ROOT'}/checks/",
        my $name = $cs->name;
        foreach my $tag ($cs->tags) {
           # $ti is an instance of Lintian::Tag::Info
           my $ti = $cs->get_tag ($tag);
           print "$tag is a part of the check $name\n";
           # Do something with $ti / $tag
        foreach my $needs ($cs->needs_info) {
           print "$name needs $needs\n";
        if ($cs->is_check_type ('binary') && $cs->is_check_type ('source')) {
           # Check applies to binary pkgs AND source pkgs


       Instances of this class represents the data in the check ".desc" files.  It allows access
       to the tags (as Lintian::Tag::Info) and the common meta data of the check (such as Needs-


       Lintian::CheckScript->new($basedir, $checkname)
           Parses the $file as a check desc file.

           Returns the "name" of the check script.  This is the value in the Check-Script field
           in the file.

           Returns the value stored in the "Type" field of the file.  For the purpose of testing
           if the check applies to a given package type, the "is_check_type" method can be used

           Note in rare cases this may return undef.  This is the case for the lintian.desc,
           where this field is simply not present.

           Returns the value of the Abbrev field from the desc file.

           Returns the (expected) path to the script implementing this check.

           Returns a list of all items listed in the Needs-Info field.  Neither the list nor its
           contents should be modified.

       $cs->is_check_type ($type)
           Returns a truth value if this check can be applied to a $type package.

           Note if $cs->type return undef, this will return a truth value for all inputs.

       $cs->add_taginfo ($taginfo)
           Associates a tag as issued by this check.

       $cs->get_tag ($tagname)
           Return the tag or undef (if the tag is not in this check).

           Returns the list of tag names in the check.  The list nor its contents should be

       $cs->run_check ($proc, $group)
           Run the check on $proc, which is in the group $group.  $proc should be a lab entry and
           must have the proper collections run on it prior to calling this method (See

           The method may error out if loading the check failed or if the check itself calls

           Returns normally on success; the return value has no semantic meaning and is currently

           NB: load_check can be used to determine if the check itself is loadable.


       Originally written by Niels Thykier <> for Lintian.


       lintian(1), Lintian::Profile(3), Lintian::Tag::Info(3)