[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] cleanup spaces between parentheses and curly brackets

On Wed, Aug 20, 2014 at 06:36:56AM -0600, Eric Blake wrote:
On 08/20/2014 05:10 AM, Martin Kletzander wrote:
And add a syntax-check for '){$'.  It's not perfect, but better than

Signed-off-by: Martin Kletzander <mkletzan redhat com>

+++ b/cfg.mk
@@ -943,6 +943,12 @@ sc_prohibit_empty_first_line:
 	  print "$(ME): Prohibited empty first line" > "/dev/stderr";	\
 	} exit fail; }' $$($(VC_LIST_EXCEPT));


Awkward name.  Maybe sc_prohibit_paren_curly: is sufficient. But that's
just bike-shedding.

I went with paren_braces.

+	@prohibit='\)\{$$'						\
+	in_vc_files='\.[ch]$$'						\

Probably also worth checking .x, as in '\.[chx]$$'

Good point, although I don't think it'll catch much there.

+	halt='put space between parentheses and curly bracket'		\

I tend to think of '(' as parenthesis, '[' as bracket, and '{' as brace;
but I've also heard people refer to '(' as round bracket, '[' as square
bracket, and '{' as curly bracket.  So this message is okay, even if I
would have used "brace" instead of "curly bracket".

And that's how we are using it in almost all places in libvirt, so I
adjusted it to match.


Thanks for the review, will push in a while.


Attachment: signature.asc
Description: Digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]