Thread (5 messages) 5 messages, 3 authors, 2021-01-05

Re: [Linux-kernel-mentees] [PATCH] checkpatch: fix unescaped left braces

From: David Laight <hidden>
Date: 2021-01-05 10:37:28
Also in: lkml

From: Joe Perches
Sent: 05 January 2021 10:01

On Tue, 2021-01-05 at 15:05 +0530, Dwaipayan Ray wrote:
quoted
Perl 5.22 onwards require that "A literal "{" should now be
escaped in a pattern".
Sounds like a good reason to never use perl :-)
Not quite correct.
quoted
checkpatch contains several literal "{". Fix such instances
by preceding them with a backslash.
Not all literal left braces need to be escaped.
https://www.perlmonks.org/?node_id=1191981
quoted
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
quoted
@@ -2036,7 +2036,7 @@ sub annotate_values {
 			print "ASSIGN($1)\n" if ($dbg_values > 1);
 			$type = 'N';


-		} elsif ($cur =~/^(;|{|})/) {
+		} elsif ($cur =~ /^(;|\{|\})/) {
isn't (;|{|}) much the same as [;{}] ??

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help