<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 20.10.24 13:09, Kieran Bingham
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:172942258848.31090.15823321404100734143@ping.linuxembedded.co.uk">
<pre wrap="" class="moz-quote-pre">Quoting Robert Mader (2024-10-19 14:16:06)
</pre>
<blockquote type="cite">
<pre wrap="" class="moz-quote-pre">To make contributing to libcamera more fun, see
<a class="moz-txt-link-freetext" href="https://editorconfig.org/">https://editorconfig.org/</a>
Signed-off-by: Robert Mader <a class="moz-txt-link-rfc2396E" href="mailto:robert.mader@collabora.com"><robert.mader@collabora.com></a>
---
.editorconfig | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 .editorconfig
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..4599ce24
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,21 @@
+# SPDX-License-Identifier: CC0-1.0
+
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+trim_trailing_whitespace = true
+
+[*.{cpp,h}]
+indent_size = 8
+indent_style = tab
+insert_final_newline = true
+
+[*.xml]
+indent_size = 2
+indent_style = space
+
+[meson.build]
+indent_size = 2
+indent_style = space
\ No newline at end of file
</pre>
</blockquote>
<pre wrap="" class="moz-quote-pre">
We have 'insert_final_newline' on cpp and .h files which I think is
good, but here in this file - theres' no final newline right? Maybe we
should add that globally? </pre>
</blockquote>
<p>Heh, good point, done in v2 (which triggered my editor to add the
new-line).<br>
</p>
<blockquote type="cite"
cite="mid:172942258848.31090.15823321404100734143@ping.linuxembedded.co.uk">
<pre wrap="" class="moz-quote-pre">
We have python code too. Should we add in the reference from
editorconfig for
[*.py]
indent_style = space
indent_size = 4
? or is that default ?</pre>
</blockquote>
I think it's the default, but doesn't hurt to add - the example
config on <a class="moz-txt-link-freetext" href="https://editorconfig.org/">https://editorconfig.org/</a> mentions it, too.<span
style="white-space: pre-wrap">
</span>
<blockquote type="cite"
cite="mid:172942258848.31090.15823321404100734143@ping.linuxembedded.co.uk">
<pre wrap="" class="moz-quote-pre">
It's cheap to add this:
Acked-by: Kieran Bingham <a class="moz-txt-link-rfc2396E" href="mailto:kieran.bingham@ideasonboard.com"><kieran.bingham@ideasonboard.com></a></pre>
</blockquote>
Oh, forgot to collect this one. Just for the record: the config here
is quite similar to what's used in Mutter, Gnome-Shell and a bunch
of other projects<span style="white-space: pre-wrap">.
</span>
<blockquote type="cite"
cite="mid:172942258848.31090.15823321404100734143@ping.linuxembedded.co.uk">
<pre wrap="" class="moz-quote-pre">
</pre>
<blockquote type="cite">
<pre wrap="" class="moz-quote-pre">--
2.47.0
</pre>
</blockquote>
</blockquote>
</body>
</html>