lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
* [lttng-dev] [PATCH lttng-tools] Extras: Perl 5.26 requires { to be escaped by \
@ 2020-11-25  8:31 Anders Wallin via lttng-dev
  2020-12-04 21:37 ` Jérémie Galarneau via lttng-dev
  0 siblings, 1 reply; 2+ messages in thread
From: Anders Wallin via lttng-dev @ 2020-11-25  8:31 UTC (permalink / raw)
  To: lttng-dev

Unescaped literal "{" characters in regular expression patterns are no
longer permissible

Signed-off-by: Anders Wallin <wallinux@gmail.com>
---
 extras/checkpatch.pl | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/extras/checkpatch.pl b/extras/checkpatch.pl
index 286c94de..14e16fae 100755
--- a/extras/checkpatch.pl
+++ b/extras/checkpatch.pl
@@ -2433,8 +2433,8 @@ sub process {
 
 # function brace can't be on same line, except for #defines of do while,
 # or if closed on same line
-		if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and
-		    !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) {
+		if (($line=~/$Type\s*$Ident\(.*\).*\s\{/) and
+		    !($line=~/\#\s*define.*do\s\{/) and !($line=~/\}/)) {
 			ERROR("OPEN_BRACE",
 			      "open brace '{' following function declarations go on the next line\n" . $herecurr);
 		}
@@ -2709,8 +2709,8 @@ sub process {
 ## 		}
 
 #need space before brace following if, while, etc
-		if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) ||
-		    $line =~ /do{/) {
+		if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
+		    $line =~ /do\{/) {
 			ERROR("SPACING",
 			      "space required before the open brace '{'\n" . $herecurr);
 		}
@@ -3005,7 +3005,7 @@ sub process {
 			    $dstat !~ /^for\s*$Constant$/ &&				# for (...)
 			    $dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ &&	# for (...) bar()
 			    $dstat !~ /^do\s*{/ &&					# do {...
-			    $dstat !~ /^\({/)						# ({...
+			    $dstat !~ /^\(\{/)						# ({...
 			{
 				$ctx =~ s/\n*$//;
 				my $herectx = $here . "\n";
-- 
2.29.2

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [lttng-dev] [PATCH lttng-tools] Extras: Perl 5.26 requires { to be escaped by \
  2020-11-25  8:31 [lttng-dev] [PATCH lttng-tools] Extras: Perl 5.26 requires { to be escaped by \ Anders Wallin via lttng-dev
@ 2020-12-04 21:37 ` Jérémie Galarneau via lttng-dev
  0 siblings, 0 replies; 2+ messages in thread
From: Jérémie Galarneau via lttng-dev @ 2020-12-04 21:37 UTC (permalink / raw)
  To: Anders Wallin; +Cc: lttng-dev

Merged in master.

Thanks!
Jérémie

On Wed, 25 Nov 2020 at 03:31, Anders Wallin via lttng-dev
<lttng-dev@lists.lttng.org> wrote:
>
> Unescaped literal "{" characters in regular expression patterns are no
> longer permissible
>
> Signed-off-by: Anders Wallin <wallinux@gmail.com>
> ---
>  extras/checkpatch.pl | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/extras/checkpatch.pl b/extras/checkpatch.pl
> index 286c94de..14e16fae 100755
> --- a/extras/checkpatch.pl
> +++ b/extras/checkpatch.pl
> @@ -2433,8 +2433,8 @@ sub process {
>
>  # function brace can't be on same line, except for #defines of do while,
>  # or if closed on same line
> -               if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and
> -                   !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) {
> +               if (($line=~/$Type\s*$Ident\(.*\).*\s\{/) and
> +                   !($line=~/\#\s*define.*do\s\{/) and !($line=~/\}/)) {
>                         ERROR("OPEN_BRACE",
>                               "open brace '{' following function declarations go on the next line\n" . $herecurr);
>                 }
> @@ -2709,8 +2709,8 @@ sub process {
>  ##             }
>
>  #need space before brace following if, while, etc
> -               if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) ||
> -                   $line =~ /do{/) {
> +               if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
> +                   $line =~ /do\{/) {
>                         ERROR("SPACING",
>                               "space required before the open brace '{'\n" . $herecurr);
>                 }
> @@ -3005,7 +3005,7 @@ sub process {
>                             $dstat !~ /^for\s*$Constant$/ &&                            # for (...)
>                             $dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ &&   # for (...) bar()
>                             $dstat !~ /^do\s*{/ &&                                      # do {...
> -                           $dstat !~ /^\({/)                                           # ({...
> +                           $dstat !~ /^\(\{/)                                          # ({...
>                         {
>                                 $ctx =~ s/\n*$//;
>                                 my $herectx = $here . "\n";
> --
> 2.29.2
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-04 21:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25  8:31 [lttng-dev] [PATCH lttng-tools] Extras: Perl 5.26 requires { to be escaped by \ Anders Wallin via lttng-dev
2020-12-04 21:37 ` Jérémie Galarneau via lttng-dev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).