public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: [PATCH 5/4] get_maintainer: shut up perl critic
Date: Mon, 26 May 2014 18:22:07 -0700	[thread overview]
Message-ID: <20140526182207.34900c22@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <1401152635.519.42.camel@joe-AO725>

Use the no critic annotation, with comment, to silence perl critic
for places where the code is correct as is.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

---

Supersedes patch 1

--- a/scripts/get_maintainer.pl	2014-05-26 18:09:38.257783683 -0700
+++ b/scripts/get_maintainer.pl	2014-05-26 18:19:25.782478516 -0700
@@ -231,7 +231,10 @@ if ($version != 0) {
     exit 0;
 }
 
+# For this usage requiring IO::Interactive is overkill
+## no critic (ProhibitInteractiveTest)
 if (-t STDIN && !@ARGV) {
+    ## use critic
     # We're talking to a terminal, but have no command line arguments.
     die "$P: missing patchfile or -f file - use --help if necessary\n";
 }
@@ -423,8 +426,13 @@ foreach my $file (@ARGV) {
 	my $file_cnt = @files;
 	my $lastfile;
 
+	# Use two argument form of open because we want
+	# to allow using "-" to indicate standard input
+
+	## no critic (ProhibitTwoArgOpen)
 	open(my $patch, "< $file")
 	    or die "$P: Can't open $file: $!\n";
+	## use critic
 
 	# We can check arbitrary information before the patch
 	# like the commit message, mail headers, etc...

  parent reply	other threads:[~2014-05-27  1:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-26 20:33 [PATCH 0/4] get_maintainer script cleanups Stephen Hemminger
2014-05-26 20:33 ` [PATCH 1/4] get_maintainer: use three argument open Stephen Hemminger
2014-05-26 20:33 ` [PATCH 2/4] get_maintainer: remove quoting on hash label Stephen Hemminger
2014-05-26 20:33 ` [PATCH 3/4] get_maintainer: use array for defining available version control Stephen Hemminger
2014-05-26 20:33 ` [PATCH 4/4] get_maintainer: use anonymous function instead of eval Stephen Hemminger
2014-05-27  1:00 ` [PATCH 0/4] get_maintainer script cleanups Joe Perches
2014-05-27  1:03   ` Joe Perches
2014-05-27  1:09     ` Stephen Hemminger
2014-05-27  1:22     ` Stephen Hemminger [this message]
2014-05-27  1:32       ` [PATCH 5/4] get_maintainer: shut up perl critic Joe Perches
2014-05-27 17:00         ` Stephen Hemminger
2014-05-27  1:06   ` [PATCH 0/4] get_maintainer script cleanups Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140526182207.34900c22@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox