[Qemu-devel] [PATCH] add editorconfig

Gerd Hoffmann posted 1 patch 6 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170717101547.22295-1-kraxel@redhat.com
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
.editorconfig | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 .editorconfig
[Qemu-devel] [PATCH] add editorconfig
Posted by Gerd Hoffmann 6 years, 9 months ago
Add a .editorconfig file for qemu.  Specifies the indent and tab style
for various files (C code and Makefiles for starters).  Most popular
editors support this either natively or via plugin.

Check http://editorconfig.org/ for details.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 .editorconfig | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 .editorconfig

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000000..b2022e391a
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,15 @@
+# http://editorconfig.org
+root = true
+
+[*]
+end_of_line = lf
+insert_final_newline = true
+charset = utf-8
+
+[Makefile*]
+indent_style = tab
+indent_size = 8
+
+[*.{c,h}]
+indent_style = space
+indent_size = 4
-- 
2.9.3


Re: [Qemu-devel] [PATCH] add editorconfig
Posted by Stefan Hajnoczi 6 years, 9 months ago
On Mon, Jul 17, 2017 at 12:15:47PM +0200, Gerd Hoffmann wrote:
> Add a .editorconfig file for qemu.  Specifies the indent and tab style
> for various files (C code and Makefiles for starters).  Most popular
> editors support this either natively or via plugin.
> 
> Check http://editorconfig.org/ for details.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  .editorconfig | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>  create mode 100644 .editorconfig
> 
> diff --git a/.editorconfig b/.editorconfig
> new file mode 100644
> index 0000000000..b2022e391a
> --- /dev/null
> +++ b/.editorconfig
> @@ -0,0 +1,15 @@
> +# http://editorconfig.org
> +root = true
> +
> +[*]
> +end_of_line = lf
> +insert_final_newline = true
> +charset = utf-8
> +
> +[Makefile*]
> +indent_style = tab
> +indent_size = 8
> +
> +[*.{c,h}]
> +indent_style = space
> +indent_size = 4

Missing .cpp and .cc (hard to choose one, we use both!).

Stefan