[lintian] 03/03: Allow the tag display limit to be configured via the --tag-display-limit command-line argument or "tag-display-limit" in lintianrc. (Closes: #813525)
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit dec91f2722f6f5325e99b05a547b67e308805803
Author: Chris Lamb <lamby@debian.org>
Date: Sun Dec 10 09:33:11 2017 +0000
Allow the tag display limit to be configured via the --tag-display-limit command-line argument or "tag-display-limit" in lintianrc. (Closes: #813525)
---
commands/lintian.pm | 9 ++++++---
debian/changelog | 3 +++
doc/lintianrc.example | 3 +++
man/lintian.pod.in | 9 ++++++++-
4 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/commands/lintian.pm b/commands/lintian.pm
index ed5fd6d..4e5badb 100755
--- a/commands/lintian.pm
+++ b/commands/lintian.pm
@@ -84,7 +84,6 @@ my %conf_opt; #names of options set in the cfg file
my %opt = ( #hash of some flags from cmd or cfg
# Init some cmd-line value defaults
'debug' => 0,
- 'tag-display-limit' => 'auto',
);
my ($experimental_output_opts, $collmap, %overrides, $unpacker, @scripts);
@@ -193,7 +192,9 @@ EOT-EOT-EOT
# Not a special option per se, but most people will probably
# not need it
print <<"EOT-EOT-EOT";
+ --tag-display-limit X Specify "tag per package" display limit
--no-tag-display-limit Disable "tag per package" display limit
+ (equivalant to --tag-display-limit=0)
EOT-EOT-EOT
}
@@ -549,6 +550,7 @@ my %opthash = (
'fail-on-warnings' => \$opt{'fail-on-warnings'},
'keep-lab' => \$opt{'keep-lab'},
'no-tag-display-limit' => sub { $opt{'tag-display-limit'} = 0; },
+ 'tag-display-limit=i' => \$opt{'tag-display-limit'},
# ------------------ configuration options
'cfg=s' => \$opt{'LINTIAN_CFG'},
@@ -1241,6 +1243,7 @@ sub parse_config_file {
'override' => \&cfg_override,
'show-overrides' => \$opt{'show-overrides'},
'suppress-tags' => \&record_suppress_tags,
+ 'tag-display-limit' => \$opt{'tag-display-limit'},
'verbose' => \&cfg_verbosity,
);
@@ -1296,7 +1299,7 @@ sub parse_config_file {
# Translate boolean strings to "0" or "1"; ignore
# errors as not all values are (intended to be)
# booleans.
- if (none { $var eq $_ } qw(jobs)) {
+ if (none { $var eq $_ } qw(jobs tag-display-limit)) {
eval { $val = parse_boolean($val); };
}
if (ref $ref eq 'SCALAR'){
@@ -1424,7 +1427,7 @@ sub configure_output {
'The color value must be one of',
'never", "always", "auto" or "html"'));
}
- if ($opt{'tag-display-limit'} eq 'auto') {
+ if (not defined $opt{'tag-display-limit'}) {
if (-t STDOUT) {
$opt{'tag-display-limit'}
= Lintian::Output::DEFAULT_INTERACTIVE_TAG_LIMIT();
diff --git a/debian/changelog b/debian/changelog
index 0e2c496..78e68ed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,9 @@ lintian (2.5.63) UNRELEASED; urgency=medium
* commands/lintian.pm:
+ [CL] Correct parsing of "jobs=42" in lintianrc. If specified, it would
be coerced to a boolean resulting in a value of 1.
+ + [CL] Allow the tag display limit to be configured via the
+ --tag-display-limit command-line argument or "tag-display-limit" in
+ lintianrc. (Closes: #813525)
* doc/lintianrc.example:
+ [CL] Add missing "jobs" entry.
diff --git a/doc/lintianrc.example b/doc/lintianrc.example
index 7e863a1..1fd73a5 100644
--- a/doc/lintianrc.example
+++ b/doc/lintianrc.example
@@ -46,3 +46,6 @@
# Suppress the listed tags (--suppress-tags)
#suppress-tags = debian-watch-may-check-gpg-signature
+
+# Specify "tag per package" display limit (--tag-display-limit)
+#tag-display-limit = 42
diff --git a/man/lintian.pod.in b/man/lintian.pod.in
index 9ea5674..8db0e09 100644
--- a/man/lintian.pod.in
+++ b/man/lintian.pod.in
@@ -391,12 +391,19 @@ the exit status of Lintian.
Tags parsed from the file will be handled as if they had been given to
the B<--suppress-tags> option (e.g. ignored if B<--tags> is used).
+=item B<--tag-display-limit>[=X]
+
+By default, lintian limits itself to emitting at most 4 instances of each
+tag per processable when STDOUT is a TTY. This option specified that limit.
+See also B<--no-tag-display-limit>.
+
=item B<--no-tag-display-limit>
By default, lintian limits itself to emitting at most 4 instances of each
tag per processable when STDOUT is a TTY. This option disables that limit.
-When STDOUT is not a TTY, lintian has no limit.
+When STDOUT is not a TTY, lintian has no limit. See also
+B<--tag-display-limit>.
=back
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: