All of lore.kernel.org
 help / color / mirror / Atom feed
From: mstefani@redhat.com (Michael Stefaniuc)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Dangling whitespace on added newlines
Date: Tue, 29 Jan 2013 22:10:30 +0100	[thread overview]
Message-ID: <51083AC6.1000606@redhat.com> (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>

             reply	other threads:[~2013-01-29 21:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29 21:10 Michael Stefaniuc [this message]
2013-01-30 10:37 ` [Cocci] Dangling whitespace on added newlines Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51083AC6.1000606@redhat.com \
    --to=mstefani@redhat.com \
    --cc=cocci@systeme.lip6.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.