qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH] Add qemu .clang-format


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [RFC PATCH] Add qemu .clang-format
Date: Wed, 31 Aug 2022 14:26:48 +0400

Hi

On Wed, Aug 31, 2022 at 10:24 AM Wang, Lei <lei4.wang@intel.com> wrote:

On 10/2/2015 1:30 AM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> clang-format is awesome to reflow your code according to qemu coding
> style in an editor (in the region you modify).
>
> (note: clang-tidy should be able to add missing braces around
> statements, but I haven't tried it, it's quite recent)
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>   .clang-format | 6 ++++++
>   1 file changed, 6 insertions(+)
>   create mode 100644 .clang-format
>
> diff --git a/.clang-format b/.clang-format
> new file mode 100644
> index 0000000..6422547
> --- /dev/null
> +++ b/.clang-format
> @@ -0,0 +1,6 @@
> +BasedOnStyle: LLVM
> +IndentWidth: 4
> +UseTab: Never
> +BreakBeforeBraces: Linux
> +AllowShortIfStatementsOnASingleLine: false
> +IndentCaseLabels: false

Hi, any progress on this? I also found a gist on GitHub which can be a
reference: https://gist.github.com/elmarco/aa5e0b23567f46fb7f0e73cde586a0c1


Yes, that was a more complete configuration from me as well, but it is 5y old already and might need some new updates.

Feel free to submit a new updated version.


--
Marc-André Lureau

reply via email to

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