[lintian] 01/01: cmd/lintian: Fix some perlcritic warnings
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 4750d8764346d6ebaa55469a3e45cb6a9a7b61eb
Author: Niels Thykier <niels@thykier.net>
Date: Sun Oct 1 13:56:22 2017 +0000
cmd/lintian: Fix some perlcritic warnings
Signed-off-by: Niels Thykier <niels@thykier.net>
---
.perlcriticrc | 2 +-
commands/lintian.pm | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/.perlcriticrc b/.perlcriticrc
index 2280a02..8d3feb5 100644
--- a/.perlcriticrc
+++ b/.perlcriticrc
@@ -41,7 +41,7 @@ functions = open opendir chdir read readdir readline closedir sysopen sysread sy
[-Modules::ProhibitExcessMainComplexity]
[Subroutines::RequireFinalReturn]
-terminal_funcs = CORE::exec fail Lintian::Util::fail Die error
+terminal_funcs = CORE::exec fatal_error fail Lintian::Util::fail Die error
[ValuesAndExpressions::ProhibitInterpolationOfLiterals]
diff --git a/commands/lintian.pm b/commands/lintian.pm
index ed02e7a..398caec 100755
--- a/commands/lintian.pm
+++ b/commands/lintian.pm
@@ -420,7 +420,7 @@ sub record_option_too_late {
fatal_error(
join(q{ },
'Warning: --include-dir and --[no-]user-dirs',
- "should be the first option(s) if given"));
+ 'should be the first option(s) if given'));
}
# Process display-info and display-level options in cfg files
@@ -454,7 +454,7 @@ sub cfg_display_level {
fatal_error(
join(q{ },
"$other and display-level may not",
- "both appear in the config file."))if $conf_opt{$other};
+ 'both appear in the config file.'))if $conf_opt{$other};
}
return if @display_level;
@@ -475,7 +475,7 @@ sub cfg_verbosity {
if ( ($var eq 'verbose' && exists $conf_opt{'quiet'})
|| ($var eq 'quiet' && exists $conf_opt{'verbose'})) {
fatal_error(
- "verbose and quiet may not both appear in the config file.");
+ 'verbose and quiet may not both appear in the config file.');
}
# quiet = no or verbose = no => no change
return unless $val;
@@ -501,7 +501,7 @@ sub cfg_override {
}
sub use_lab_tool_instead {
- fatal_error("Please use lintian-lab-tool instead");
+ fatal_error('Please use lintian-lab-tool instead');
}
# Hash used to process commandline options
@@ -577,13 +577,13 @@ sub _main {
$err =~ s/\n//;
# Special-case the message from the signal handler as it is not
# entirely unexpected.
- if ($err eq "N: Interrupted") {
+ if ($err eq 'N: Interrupted') {
fatal_error($err);
}
print STDERR "$err\n";
- fatal_error("Uncaught exception");
+ fatal_error('Uncaught exception');
}
- fatal_error("Assertion error: _main returned !?");
+ fatal_error('Assertion error: _main returned !?');
}
sub main {
@@ -1672,7 +1672,7 @@ sub parse_options {
# check specified action
$action = 'check' unless $action;
- fatal_error("Cannot use profile together with --ftp-master-rejects.")
+ fatal_error('Cannot use profile together with --ftp-master-rejects.')
if $opt{'LINTIAN_PROFILE'} and $opt{'ftp-master-rejects'};
# --ftp-master-rejects is implemented in a profile
$opt{'LINTIAN_PROFILE'} = 'debian/ftp-master-auto-reject'
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: