[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.11-239-gfc89564



The following commit has been merged in the master branch:
commit fc8956491940c06d993f86a7a6918f45b95e981a
Author: Niels Thykier <niels@thykier.net>
Date:   Thu Apr 11 23:14:46 2013 +0200

    lintian: Add --default-display-level option
    
    Add --default-display-level command-line option to reset the display
    level.  This allows the user to have a custom display level in his/her
    config file and still occasionally use the built-in default display
    level.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/debian/changelog b/debian/changelog
index cad12a9..9ac38c5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -205,7 +205,10 @@ lintian (2.5.12) UNRELEASED; urgency=low
       to --profile.
     + [NT] Add new command line option "--ignore-lintian-env" to make
       lintian ignore all environment variables starting with LINTIAN_.
-    + [NT] Add a new command line option --no-display-experimental.
+    + [NT] Add a new command line option --no-display-experimental
+      and --default-display-level.  These options can be used to
+      override some display options from the config file.
+      (Closes: #703985)
     + [NT] Also search for the lintianrc file in XDG_CONFIG_{HOME,DIRS}.
       The default paths are now ~/.config/lintian/lintianrc and
       /etc/xdg/lintian/lintianrc.  The previous lintianrc paths are
diff --git a/frontend/lintian b/frontend/lintian
index 7eeb2a6..8f1ecde 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -177,6 +177,7 @@ General options:
 Behaviour options:
     --allow-root              suppress lintian\'s warning when run as root
     --color never/always/auto disable, enable, or enable color for TTY
+    --default-display-level   reset the display level to the default
     --display-source X        restrict displayed tags by source
     -E, --display-experimental display "X:" tags (normally suppressed)
     --no-display-experimental suppress "X:" tags
@@ -366,6 +367,15 @@ sub display_pedantictags {
     push(@display_level, [ '+', '=', 'pedantic' ]);
 }
 
+# Process --default-display-level flag
+sub default_display_level {
+    push(@display_level,
+         ['=', '>=', 'important'],
+         ['+', '>=', 'normal', 'possible'],
+         ['+', '>=', 'minor', 'certain'],
+        );
+}
+
 # Process --display-source flag
 sub record_display_source {
     $display_source{$_[1]} = 1;
@@ -475,6 +485,7 @@ my %opthash = (                 # ------------------ actions
                'display-experimental|E!' => \$opt{'display-experimental'},
                'pedantic' => \&display_pedantictags,
                'display-level|L=s' => \&record_display_level,
+               'default-display-level' => \&default_display_level,
                'display-source=s' => \&record_display_source,
                'suppress-tags=s' => \&record_suppress_tags,
                'suppress-tags-from-file=s' => \&record_suppress_tags_from_file,
diff --git a/man/lintian.pod.in b/man/lintian.pod.in
index 2b90902..1a26212 100644
--- a/man/lintian.pod.in
+++ b/man/lintian.pod.in
@@ -204,6 +204,15 @@ attribute (instead of ANSI color escape sequences).
 
 This option overrides the B<color> variable in the configuration file.
 
+=item B<--default-display-level>
+
+Reset the current display level to the default.  This option behaves
+exactly like passing B<-L> ">=important" B<-L> "+>=normal/possible"
+B<-L> "+minor/certain" to lintian.
+
+One use for this option is to override only the display settings in
+the config file.
+
 =item B<--display-source> X
 
 Only display tags from the source X (e.g. the Policy Manual or the
@@ -273,7 +282,7 @@ remove or set the levels to display, specifying a severity (S:
 serious, important, normal, minor, wishlist, pedantic), a certainty
 (C: certain, possible, wild-guess), or both (S/C).  The default
 settings are equivalent to B<-L> ">=important" B<-L>
-"+>=normal/possible" B<-L> +minor/certain).
+"+>=normal/possible" B<-L> "+minor/certain").
 
 This option overrides the B<display-level> variable in the
 configuration file.  The value of the B<display-level> in

-- 
Debian package checker


Reply to: