qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] add scripts/indent.sh


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH] add scripts/indent.sh
Date: Mon, 17 Jul 2017 10:36:06 +0000

Hi

On Mon, Jul 17, 2017 at 12:18 PM Gerd Hoffmann <address@hidden> wrote:

> Script to reformat sources in qemu style.
>
> Signed-off-by: Gerd Hoffmann <address@hidden>
>

A quite powerful approach would be to use clang-format:
https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg01278.html

It comes with a bunch of editor integration and scripts. My config could
use a bit more tweaking though, I haven't been using it for a while, and
newer version have more options.


> ---
>  scripts/indent.sh | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>  create mode 100755 scripts/indent.sh
>
> diff --git a/scripts/indent.sh b/scripts/indent.sh
> new file mode 100755
> index 0000000000..8f045ecb1d
> --- /dev/null
> +++ b/scripts/indent.sh
> @@ -0,0 +1,11 @@
> +#!/bin/sh
> +#
> +# indent wrapper script, with args to format
> +# source code according to qemu coding style.
> +#
> +indent --ignore-profile        \
> +       --k-and-r-style         \
> +       --line-length 80        \
> +       --indent-level 4        \
> +       --no-tabs               \
> +       "$@"
> --
> 2.9.3
>
>
> --
Marc-André Lureau


reply via email to

[Prev in Thread] Current Thread [Next in Thread]