Re: [hackers] [PATCH] Continue style fixing: function declarations, code alignement

From: Christoph Lohmann <20h_AT_r-36.net>
Date: Tue, 20 Oct 2015 08:44:10 +0200

Greetings.

On Tue, 20 Oct 2015 08:44:10 +0200 Quentin Rameau <quinq+hackers_AT_fifth.space> wrote:
> > > + .v = (char *[]){ "/bin/sh", "-c", \
> > > + "prop=\"`xprop -id $2 $0 " \
> > > + "| sed \"s/^$0(STRING) = \\(\\\\\"\\?\\)\\(.*\\)\\1$/\\2/\" " \
> > > + "| xargs -0 printf %b | dmenu`\" &&" \
> > > + "xprop -id $2 -f $1 8s -set $1 \"$prop\"", \
> > > + p, q, winid, NULL \
> > > +} \
> >
> > Why this change? (Including the other ones doing the same.)
> Quoting the style page (which I agree with on that point at least),
> “Use spaces not tabs for multiline macros as the indentation level is 0, where the #define began”

The style guide is not holy and I’m willing to create a shiism of this
religious writing just to use tabs where they belong to. In these macros
tabs have to be used for indentation.

> > > static Key keys[] = {
> > > - /* modifier keyval function arg Focus */
> > > + /* modifier keyval function arg Focus */
> > > { MODKEY|GDK_SHIFT_MASK,GDK_r, reload, { .b = TRUE } },
> > > { MODKEY, GDK_r, reload, { .b = FALSE } },
> > > { MODKEY|GDK_SHIFT_MASK,GDK_p, print, { 0 } },
> >
> > Why don’t you add a tab in front of the array elements instead and move
> > everything to tabs?
> I didn't want to change the config file lines and make them too long so I didn't
> touch those, but I will do that if you think it's better.
> I wouldn't move everything to tabs though as this is alignement, not indentation.

If we do the complete remake, tabs at the beginning and whitespaces in‐
side would make sense. Markus liked it too.

> > > - 0, closure);
> > > + 0, closure);
> > This is so ugly and looks like GNU style. Why do you want to move the
> > parameters too far left?
> To be consistant with the rest of the indentation/alignement style. And I wanted
> to keep the code as it is when possible.

As said, I hereby officially declare a religious split for the surf or‐
thodoxy! We want tabs everywhere! All infidels will be killed who use
spaces at the beginning of some indentation! Of course in other projects
other holy words may apply.

> > > - && strlen(uri) > 0) {
> > > + && strlen(uri) > 0) {
> > No.
> Same answer.

Be on the good side or the bad side. I am holding the sword of god!


Sincerely,

Christoph Lohmann
Received on Tue Oct 20 2015 - 08:44:10 CEST

This archive was generated by hypermail 2.3.0 : Tue Oct 20 2015 - 09:00:12 CEST