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

Re: [Xen-devel] [PATCH] Document the current coding style conventions.

On Wed, 2012-03-14 at 17:27 +0000, David Vrabel wrote:
> From: David Vrabel <david.vrabel@xxxxxxxxxx>
> Based on a version originally posted in 2007.
> http://lists.xen.org/archives/html/xen-devel/2007-06/msg00070.html
> Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
> ---
>  docs/misc/coding_style.txt |  100 
> ++++++++++++++++++++++++++++++++++++++++++++

Thanks for this!

I think this should be CODING_STYLE at the top level (in the vein of
top-level COPYRIGHT + local overrides) and commence with an intro such

        The Xen coding style described below is the coding style used by
        the Xen hypervisor itself (xen/*) as well as various associated
        low-level libraries (e.g. tools/libxc/*).
        An exception is made for files which are imported from an
        external source. In these cases the prevailing coding style of
        the upstream source is generally used (commonly the Linux coding
        Other parts of the code base may use other coding styles,
        sometimes explicitly (e.g. tools/libxl/CODING_STYLE) but often
        implicitly (Linux coding style is fairly common). In general you
        should copy the style of the surrounding code. If you are unsure
        please ask.

> +Emacs local variables
> +---------------------
> +
> +A comment block containing local variables for emacs is permitted at
> +the end of files.  It should be:
> +
> +/*
> + * Local variables:
> + * mode: C
> + * c-file-style: "BSD"
> + * c-basic-offset: 4
> + * indent-tabs-mode: nil
> + * End:
> + */

You mentioned a while ago that the comment block we've been cutting and
pasting around the place was buggy. Is this the prevailing buggy one or
did you fix it up here?


Xen-devel mailing list



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