[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] CODING_STYLE: explicitly call out label indentation




> On Nov 27, 2018, at 4:48 PM, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx> wrote:
> 
> On 27/11/2018 16:22, Ian Jackson wrote:
>> Since there was some confusion about what we are talking about, see
>> below.  Obviously the diff output in my `1' test cases is
>> prefereable.   Note that `git diff' does the same thing as diff -p
>> (and it doesn't even need a -p option to do it).
> 
> After some investigation, git does the correct thing when you ask to
> treat c files as c files.
> 
> andrewcoop@andrewcoop:~$ cat .config/git/attributes
> *.[hc] diff=cpp
> 
> This has the additional side effect of making `git diff --color-words`
> and friends far more legible and nice to use.  Its a shame this isn't
> the default.
> 
>> I also observe that by default, emacs wants to indent the label by 1
>> character - even though usually it likes to align labels to the LHS of
>> the enclosing block.  Presumably for this reason.
> 
> And after some investigation, emacs does the wrong thing in the Xen tree
> because we explicitly ask for BSD style in the local block.
> 
> We should make a choice, then fix our automatic tooling to not force
> code to be non-compliant.

FWIW, having labels in column 0 always looked wrong to me.  I’m happy to change 
the style to require at least 1 space, but I’m *not* happy to have a style 
enforced that contradicts what we’ve written in the emacs style blocks at the 
bottom of all the files.

Would it be OK if we 
* Checked in this patch, but
* Weren’t picky about enforcing it yet
* Looked into an efficient way to get a suitable style update?

 -George
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.