Felix Lechner pushed to branch master at lintian / lintian


Commits:
6c7539b7 by Felix Lechner at 2022-01-23T13:34:51-08:00
Deprecate --no-tag-display-limit for '--tag-display-limit 0'; update 
documentation. (Closes: #1004239)

> tag-display-limit can be set from the configuration file
> this is not mentioned in the manual page.

Fixed here

> would it not make more sense to make all command line options configurable
> from the configuration file and only mention the exceptions?

We love suggestions on how to make Lintian simpler and more intuitive, but
there are 42 command-line options [1] and just sixteen configuration options.
[2] Your ideas are welcome!

I have been somewhat stingy with configuration option because we may have to
support them forever.

[1] https://salsa.debian.org/lintian/lintian/-/blob/master/bin/lintian#L136-177
[2] https://salsa.debian.org/lintian/lintian/-/blob/master/bin/lintian#L259-276

> would it make sense to have tag-display-limit=0 a synonym
> to no-tag-display-limit?

It has been a synonym for a while, but only on the command-line, where
'--no-tag-display-limit' is now deprecated in favor of 
'--tag-display-limit 0'.

In configuration files, the setting 'no-tag-display-value' was 
previously not
supported.

> It seems surprising [...] that no-tag-display-limit cannot be set in the
> configuration file.

Please use 'tag-display-limit=0' in your configuration file.

Thanks to Marc Haber for bringing all these matters to our attention!

- - - - -


3 changed files:

- bin/lintian
- lib/Lintian/Output/EWI.pm
- man/lintian.pod


Changes:

=====================================
bin/lintian
=====================================
@@ -208,8 +208,12 @@ if (exists $command_line{'hide-overrides'}) {
     );
 }
 
-$command_line{'tag-display-limit'} = 0
-  if exists $command_line{'no-tag-display-limit'};
+if (exists $command_line{'no-tag-display-limit'}) {
+    $command_line{'tag-display-limit'} = 0;
+    warn encode_utf8(
+"A future release will drop --no-tag-display-limit; please use 
'--tag-display-limit 0' instead.\n"
+    );
+}
 
 my $LINTIAN_CFG = $command_line{cfg};
 
@@ -1024,18 +1028,16 @@ Behavior options:
     --pedantic                display "P:" tags (normally suppressed)
     --profile X               Use the profile X or use vendor X checks
     --show-overrides          output tags that have been overridden
-    --hide-overrides          do not output tags that have been overridden 
(default)
     --suppress-tags T,...     don't show the specified tags
     --suppress-tags-from-file X don't show the tags listed in file X
-    --tag-display-limit X     Specify "tag per package" display limit
-    --no-tag-display-limit    Disable "tag per package" display limit
-                              (equivalent to --tag-display-limit=0)
+    --tag-display-limit NUM   Specify "tag per package" display limit
+
 Configuration options:
     --cfg CONFIGFILE          read CONFIGFILE for configuration
     --no-cfg                  do not read any config files
     --ignore-lintian-env      ignore LINTIAN_* env variables
     --include-dir DIR         include checks, libraries (etc.) from DIR
-    -j X, --jobs X            limit the number of parallel unpacking jobs to X
+    -j NUM, --jobs NUM        limit the number of parallel jobs to NUM
     --[no-]user-dirs          whether to use files from user directories
 
 Some options were omitted. Please check the manual page for the complete list.


=====================================
lib/Lintian/Output/EWI.pm
=====================================
@@ -257,7 +257,7 @@ sub print_hint {
           if $emitted_count >= $limit;
 
         my $msg
-          = ' ... use --no-tag-display-limit to see all (or pipe to a 
file/program)';
+          = ' ... use "--tag-display-limit 0" to see all (or pipe to a 
file/program)';
         $information = $self->_quote_print($msg)
           if $emitted_count >= $limit-1;
     }


=====================================
man/lintian.pod
=====================================
@@ -230,7 +230,10 @@ addition to the lintian error tags. To print a long tag 
description
 without running lintian, see L<lintian-explain-tags(1)> or check
 the website at https://lintian.debian.org.
 
-This option overrides B<info> variable in the configuration file.
+To negate it, please use B<--no-info>.
+
+This option overrides B<info> (or B<no-info>) variable in the configuration
+file.
 
 =item B<-I>, B<--display-info>
 
@@ -331,7 +334,7 @@ If not specified, the default value is I<{VENDOR}/main>.
 Please Refer to the Lintian User Manual for the full documentation of
 profiles.
 
-=item B<--show-overrides>, B<--hide-overrides>
+=item B<--show-overrides>
 
 Controls whether tags that have been overridden should be shown.
 
@@ -343,9 +346,10 @@ also be displayed (unless --quiet is used).  Please refer 
to the Lintian
 User Manual for the documentation on how lintian relates comments to a
 given override.
 
+To negate it, please use B<--no-show-overrides>.
 
-These options override the B<show-overrides> variable in the
-configuration file.
+This option overrides the B<show-overrides> (or B<no-show-overrides>) variable
+in the configuration file.
 
 =item B<--suppress-tags> tag1,tag2,...
 
@@ -371,19 +375,17 @@ 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]
+=item B<--tag-display-limit>[=NUM]
 
 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>.
+tag per processable when STDOUT is a TTY.  This option specifies that limit.
 
-=item B<--no-tag-display-limit>
+When STDOUT is not a TTY, lintian has no 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.
+To disable the limit, please use a value of zero.
 
-When STDOUT is not a TTY, lintian has no limit. See also
-B<--tag-display-limit>.
+This option overrides the B<tag-display-limit> variable in the
+configuration file.
 
 =back
 



View it on GitLab: 
https://salsa.debian.org/lintian/lintian/-/commit/6c7539b7b56118db5c7f6e9466739d19e303df1d

-- 
View it on GitLab: 
https://salsa.debian.org/lintian/lintian/-/commit/6c7539b7b56118db5c7f6e9466739d19e303df1d
You're receiving this email because of your account on salsa.debian.org.


Reply via email to