[Spice-devel] [spice-server] style: Slight tweak to the header guard section

Christophe Fergeau cfergeau at redhat.com
Thu Feb 15 14:55:23 UTC 2018


On Thu, Feb 15, 2018 at 03:25:23PM +0100, Christophe de Dinechin wrote:
> 
> 
> > On 15 Feb 2018, at 13:41, Christophe Fergeau <cfergeau at redhat.com> wrote:
> > 
> > On Thu, Feb 15, 2018 at 11:55:44AM +0100, Christophe de Dinechin wrote:
> >> Now, Christophe’s arguments are that
> >> 
> >> 1) we should not write guidelines that are inconsistent with existing code.
> >> 2) this is in the server codebase, so we should server rules
> >> 
> >> Problem is with 2, really.
> >> 
> >> We started updating the guidelines because we wanted to talk about C++
> >> style in the streaming agent, not the server.
> >> I updated the server guidelines, because that’s historically where the
> >> style guide has been, and the only place where SPICE has one.
> >> 
> >> For now, I’d vote for stating that the server guidelines apply to all
> >> of the SPICE code. If we decide that means we should move them
> >> elsewhere, that’s fine with me.
> >> 
> >> If that idea is accepted, then Christophe (2) no longer hold, and we
> >> can explicitly state that we accept both // and /* for all comments,
> >> including that one.
> > 
> > My patch was changing the example from using // to using /*,
> 
> That part I’m OK with.
> 
> > and was
> > adding a note explicitly saying // was acceptable too.
> 
> That may have been your intent, but the way you wrote it was:
> 
> "C++ headers would use C++ comments."
> 
> This suggests that you can’t use // in C headers. Is that something we really want to enforce?
> 
> Again, I’d much prefer that we write somewhere that // or /* comments are both OK (not specifically for headers guards)

All I care about is that things stay mostly consistent within a given
project. I don't want someone to come and say "oh but it's written in
the coding style that I can use #endif // MY_MODULE_H!!" when the rest
of the codebase is not using that.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180215/c04eb12c/attachment.sig>


More information about the Spice-devel mailing list