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: Wang, Lei
Subject: Re: [Qemu-devel] [RFC PATCH] Add qemu .clang-format
Date: Wed, 31 Aug 2022 14:23:51 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.13.0


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



reply via email to

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