Re: [dev] [dwm] Style changes

From: Dimitris Papastamos <>
Date: Fri, 10 Apr 2015 09:57:48 +0100

On Fri, Apr 10, 2015 at 05:07:56PM +1200, David Phillips wrote:
> Out of curiosity, I wrote a small tool which enforces small subset of
> the suckless style [0]:
> > - Use a space after if, for, while, switch (they are not function calls)
> > - Do not use a space with sizeof() (it does act like a function call)
> I ran it over a handful of suckless sources including dwm.c, and it
> generated a patch with 294 changes. I am still part-way through
> manually checking each change, but it looks like all the changes it's
> making are indeed bringing the code closer to conforming to the style
> guide.
> Before submitting a patch, I've got a couple of questions:
> * Is there an immediate reason a patch of this nature would be
> rejected? Is there something obvious that I'm missing?
> * Is it worth submitting patches to align suckless code with the
> suckless style guide?
> * More specifically, does the community actually care enough about
> retrospectively making such minor changes in code?

In addition to what others aid, keep in mind that the style guide is
just a guide. It depends on the maintainer of the project to decide
if it is worth the trouble.

As an example, we avoid using typedefs entirely in sbase and ubase.
Other suckless projects use them. Both practices are OK.

We shouldn't aim for extreme style consistency across projects but across
code within the same project.

Received on Fri Apr 10 2015 - 10:57:48 CEST

This archive was generated by hypermail 2.3.0 : Fri Apr 10 2015 - 11:00:09 CEST