Author: rra Date: 2008-01-03 08:59:16 +0100 (Thu, 03 Jan 2008) New Revision: 1102
Modified: trunk/debian/changelog trunk/frontend/lintian-info trunk/man/lintian-info.1 Log: + [RA] Add -a to annotate an override file. * man/lintian-info.1: + [RA] Document the --annotate option. Modified: trunk/debian/changelog =================================================================== --- trunk/debian/changelog 2008-01-03 07:21:56 UTC (rev 1101) +++ trunk/debian/changelog 2008-01-03 07:59:16 UTC (rev 1102) @@ -63,6 +63,7 @@ + [RA] Add support for HTML coloring. (Closes: #458376) * frontend/lintian-info: + [RA] Allow for HTML color tags. + + [RA] Add -a to annotate an override file. * lib/Dep.pm: + [RA] Allow substvars instead of package names so that dependency @@ -80,6 +81,8 @@ * man/lintian.1: + [RA] Document the --color=html option. + * man/lintian-info.1: + + [RA] Document the --annotate option. * reporting/html_reports: + [RA] Rewritten. Modified: trunk/frontend/lintian-info =================================================================== --- trunk/frontend/lintian-info 2008-01-03 07:21:56 UTC (rev 1101) +++ trunk/frontend/lintian-info 2008-01-03 07:59:16 UTC (rev 1102) @@ -42,9 +42,9 @@ my %tag_info = %{read_tag_info()}; -my ($tags); +my ($annotate, $tags); Getopt::Long::config('bundling', 'no_getopt_compat', 'no_auto_abbrev'); -GetOptions('tags|t' => \$tags) +GetOptions('annotate|a' => \$annotate, 'tags|t' => \$tags) or die("error parsing options\n"); # If tag mode was specified, read the arguments as tags and display the @@ -72,14 +72,19 @@ while (<>) { print; chomp; + next if /^\s*$/; s/\e[\[\d;]*m//g; s/<span style=\"[^\"]+\">//g; s,</span>,,g; - my $tag; - my ($type, $pkg, @pieces) = split(/:\s+/); - if (defined $type and $type =~ m/^[OEWIX]$/) { - $tag = shift @pieces; + my ($type, $pkg); + my @pieces = split(/:\s+/); + if ($annotate) { + $type = shift @pieces if ($pieces[0] =~ /^\w$/); + $pkg = shift @pieces if ($pieces[0] =~ /^\S+( (binary|udeb))?$/); + } + if ($annotate or (defined $type and $type =~ m/^[OEWIX]$/)) { + my $tag = shift @pieces; next if not defined $tag; ($tag) = split(/\s+/, $tag, 2); Modified: trunk/man/lintian-info.1 =================================================================== --- trunk/man/lintian-info.1 2008-01-03 07:21:56 UTC (rev 1101) +++ trunk/man/lintian-info.1 2008-01-03 07:59:16 UTC (rev 1102) @@ -24,7 +24,7 @@ .SH SYNOPSIS .B lintian-info -.RI [ log-file ] +.RI [ log-file ... ] \&... .B lintian-info \-\-tags @@ -35,10 +35,11 @@ .PP The .B lintian-info -command either parses the output of the +command parses the output of the .B lintian command and gives verbose information about the listed Lintian error -tags or (if given the +tags, parses a Lintian override file and gives verbose information about +the tags included, or (if given the .BR \-t " or " \-\-tags option) explains a given tag or tags. .sp @@ -59,6 +60,12 @@ .SH OPTIONS .TP +.BR \-a ", " \-\-annotate +Read from standard input or any files specified on the command line and +search the input for lines formatted like Lintian override entries. For +each one that was found, display verbose information about that tag. + +.TP .BR \-t ", " \-\-tags Rather than treating them as log file names, treat any command-line options as tag names and display the descriptions of each tag. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]