Skip to contentSkip to conversation

Dangling whitespace on added newlines

Cocci Michael Stefaniuc 2 participants 2 messages Jan 29, 2013 – Jan 30, 2013

lore
Share & tools
lore
#0 lore raw

Hello,

when coccinelle automatically adds a newline after removing "{}" the added newline has dangling whitespace corresponding to the indentation level. Please see the attached test case and generated patch.

thanks
bye
michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dangling.c
Type: text/x-csrc
Size: 161 bytes
Desc: not available
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20130129/d52532f5/attachment.bin>
-------------- next part --------------
@@
identifier mem;
statement S;
@@
mem = malloc(...);
if (mem == NULL)
-{
- ERR(...);
S
-}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dangling.diff
Type: text/x-patch
Size: 236 bytes
Desc: not available
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20130129/d52532f5/attachment-0001.bin>

#1 lore raw
Quoted 5 lines · Michael Stefaniuc

Hello,

when coccinelle automatically adds a newline after removing "{}" the added newline has dangling whitespace corresponding to the indentation level. Please see the attached test case and generated patch.

Thanks for the report. We will look into it.

julia