[Linux-kernel-mentees] [Cocci] [PATCH] parsing_c: Add space for tokens after *

Jaskaran Singh jaskaransingh7654321 at gmail.com
Thu Jan 16 11:36:36 UTC 2020


On Thu, 2020-01-16 at 17:01 +0530, Jaskaran Singh wrote:
> On Thu, 2020-01-16 at 11:59 +0100, Julia Lawall wrote:
> > On Thu, 16 Jan 2020, Jaskaran Singh wrote:
> > 
> > > On Thu, 2020-01-16 at 11:40 +0100, Markus Elfring wrote:
> > > > > In certain cases, there is no space added after the Pointer
> > > > > type.
> > > > 
> > > > Will such a pretty-printing detail matter also for the
> > > > clarification
> > > > of
> > > > a topic like “Make change influence configurable for coding
> > > > style
> > > > rules”?
> > > > https://github.com/coccinelle/coccinelle/issues/37
> > > > 
> > > 
> > > Not sure what you mean. If you mean to say that the result should
> > > conform to the Linux coding style (i.e. the result should be
> > > "const
> > > char * const * y" with spaces et al intact), that seems like
> > > something
> > > for a different patch, right? Whether you want Coccinelle to
> > > conform to
> > > Linux coding style or not, the space should be added either way.
> > 
> > The option --smpl-spacing should address this issue, by preservign
> > the
> > spacing illustrated in the semantic patch.  I don't know if it does
> > that
> > in this case.
> > 
> 
> Hm, can't say that it does. Here's what I get with --smpl-spacing on
> case https://www.mail-archive.com/cocci@systeme.lip6.fr/msg06696.html
> 

Whoops, incorrect link
https://www.mail-archive.com/cocci@systeme.lip6.fr/msg06695.html

Cheers,
Jaskaran.

> before:
> 
>  void main() {
> -	const char * const * x;
> +	const char *const*y  ;
>  }
> 
> after:
> 
>  void main() {
> -	const char * const * x;
> +	const char *const *y  ;
>  }
> 
> Cheers,
> Jaskaran.
> 
> > julia
> > 
> > > Cheers,
> > > Jaskaran.
> > > 
> > > > Regards,
> > > > Markus
> > > 
> > > _______________________________________________
> > > Cocci mailing list
> > > Cocci at systeme.lip6.fr
> > > https://systeme.lip6.fr/mailman/listinfo/cocci



More information about the Linux-kernel-mentees mailing list