Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180103150833.3fe810e6@inria.fr>
Date: Wed, 3 Jan 2018 15:08:33 +0100
From: Jens Gustedt <jens.gustedt@...ia.fr>
Cc: musl@...ts.openwall.com
Subject: automated coding style

Hello Rich,

On Thu, 21 Dec 2017 18:34:02 -0500 Rich Felker <dalias@...c.org> wrote:

> On Thu, Dec 21, 2017 at 12:06:55PM +0100, Jens Gustedt wrote:

> > > There seems to be some mixing of tabs and spaces here and in a few
> > > other lines. Tabs should be used for indentation levels, spaces
> > > (after any initial indent) to column-align. Generally musl style
> > > also has continuation comment lines begin with a * aligned with
> > > the * of the opening /* too.  
> > 
> > Since I ran into similar comments before and I find it quite
> > frustrating and disruptive:  
> 
> By similar comments do you mean existing comments in the musl source
> styled like you did it, or similar email comments before about styling
> matters?

comments about style.

it think an automatic formatting procedure that accommodates everybody
could help us focus on contents

> I'm not familiar with these tools, so I could look into it, but
> someone else interested might be able to get to it before me. I'll
> see. The way I deal with touching code in lots of different projects
> with different styles is having my editor configured to copy exactly
> the leading whitespace of the previous line when adding a new line,
> and then adding or deleting tabs or spaces as appropriate. But I can
> see how that's not agreeable to everyone.
> 
> Actually now that I think about it, I'm pretty sure the official Linux
> kernel style is nearly the same as preferred style in musl, and should
> usually produce formatting that's perfectly acceptable.

so for my latest patches I experimented with

astyle --style=linux --indent=tab

This helps a lot, already. Unfortunately, this combination still
changes some musl sources, basically because indentation of
continuation lines is handled differently.

Thanks
Jens

-- 
:: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.