[lintian] 01/04: Replace some (a|b) with [ab] in regexes
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit ff4912501c1fb2d8d1af919bf7cae8362dd36646
Author: Niels Thykier <niels@thykier.net>
Date: Sun Jul 19 14:23:56 2015 +0200
Replace some (a|b) with [ab] in regexes
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/files.pm | 4 ++--
checks/scripts.pm | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/checks/files.pm b/checks/files.pm
index 4aca7d7..f309117 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -1091,7 +1091,7 @@ sub run {
my $fd = $file->open;
while (<$fd>) {
if (
- m{ (?:do|require)\s+(?:'|") # do/require
+ m{ (?:do|require)\s+['"] # do/require
# Huge list of perl4 modules...
(abbrev|assert|bigfloat|bigint|bigrat
@@ -1101,7 +1101,7 @@ sub run {
|open2|open3|pwd|shellwords|stat|syslog
|tainted|termcap|timelocal|validate)
# ... so they end with ".pl" rather than ".pm"
- \.pl(?:'|")
+ \.pl['"]
}xsm
) {
tag 'perl-module-uses-perl4-libs-without-dep',
diff --git a/checks/scripts.pm b/checks/scripts.pm
index 2982f89..4f1a163 100644
--- a/checks/scripts.pm
+++ b/checks/scripts.pm
@@ -398,7 +398,7 @@ sub run {
my $fd = $path->open;
while (<$fd>) {
if (
- m{ (?:do|require)\s+(?:'|") # do/require
+ m{ (?:do|require)\s+['"] # do/require
# Huge list of perl4 modules...
(abbrev|assert|bigfloat|bigint|bigrat
@@ -408,7 +408,7 @@ sub run {
|open2|open3|pwd|shellwords|stat|syslog
|tainted|termcap|timelocal|validate)
# ... so they end with ".pl" rather than ".pm"
- \.pl(?:'|")
+ \.pl['"]
}xsm
) {
tag 'script-uses-perl4-libs-without-dep',
@@ -429,7 +429,7 @@ sub run {
$depends = $base;
}
if ($depends && !$all_parsed->implies($depends)) {
- if ($base =~ /^(python|ruby|(m|g)awk)$/) {
+ if ($base =~ /^(python|ruby|[mg]awk)$/) {
tag("$base-script-but-no-$base-dep", $filename);
} elsif ($base eq 'csh' && $filename =~ m,^etc/csh/login\.d/,){
# Initialization files for csh.
@@ -930,7 +930,7 @@ sub run {
pos($divert) = undef;
# position after the last pair of quotation marks, if any
- 1 while ($divert =~ m/\G.*?(\"|\').+?\1/gc);
+ 1 while ($divert =~ m/\G.*?(["']).+?\1/gc);
# Strip anything matching and after '&&', '||', ';', or '>'
# this is safe only after we are positioned after the last pair
# of quotation marks
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: