{ head("Lintian Tags") }
  <h1>Tags</h1>

  <p>
    This is a list of all tags that occur at least once in the archive
    sorted by severity.  This includes all tags, even experimental and
    info tags.
  </p>

{
    my @tags = sort keys %tags;
    for my $severity (qw/error warning info pedantic classification/) {
        my $heading = 0;
        for my $tag (@tags) {
            my ($first) = @{ $tags{$tag} };
            my $tag_info = $first->{tag_info};
            next unless $tag_info->effective_severity eq $severity;
            unless ($heading) {
                $OUT .= "  <h2>Severity: $severity,";
                $OUT .= "  <ul>\n";
                $heading = 1;
            }
            my $packages = $stats{$tag}{'packages'};
            my $count = $stats{$tag}{'count'};
            my $overrides = $stats{$tag}{'overrides'};
            my $q_tag = html_quote($tag);
            $OUT .= qq(    <li><a href="${path_prefix}tags/${q_tag}.html">${q_tag}</a>)
                . " ($packages packages, $count tags"
                . ($overrides > 0 ? ", plus $overrides overrides" : "")
                . ")</li>\n";
        }
        if ($heading) {
            $OUT .= "  </ul>\n\n";
        }
    }
}
{ foot() }
