[Spice-devel] [PATCH v4 01/12] Add .clang-format with defaults matching what's specified in the style guide

Christophe Fergeau cfergeau at redhat.com
Fri Feb 16 09:07:41 UTC 2018


On Thu, Feb 15, 2018 at 05:06:14PM +0100, Christophe de Dinechin wrote:
> From: Christophe de Dinechin <dinechin at redhat.com>
> 
> There are two use cases for this .clang-format:
> 
> 1. Local reformatting of source code, e.g. using Emacs clang-format.el package.
>    This is basically a wawy to accelerate routine reformatting actions during

'way'

>    heavy editing or refactoring.
> 
> 2. Global reformatting of the source code, e.g. using the 'make reformat'
>    rule in the 'build' makefiles.
> 
> Presently, our source code is not entirely ready for this kind of
> refactoring yet, mostly because several of our headers are not
> self-contained, so you end up with errors like:
> 
>     In file included from agent-msg-filter.c:25:
>     In file included from ./red-common.h:37:
>     In file included from ./spice.h:27:
>     ./spice-migration.h:47:31: error: unknown type name 'SpiceServer'

My understanding was also that this .clang-format file got the
formatting wrong in some cases when applied over the codebase?



> Changes since v3:
> - Documented rationale and use cases in commit log
> - Some setting changes to more closely match existing server practice

NB: This part belongs below the -- line as this usually should not be pushed
to the upstream repository
-------------- 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/20180216/a69079b2/attachment.sig>


More information about the Spice-devel mailing list