<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body smarttemplateinserted="true">
    <div id="smartTemplate4-template">Hi Michael,</div>
    <div><br>
    </div>
    <div>Thanks for your review!</div>
    <div><br>
    </div>
    <div id="smartTemplate4-quoteHeader">Michael
Stefaniuc <a class="moz-txt-link-rfc2396E" href="mailto:mstefani@winehq.org"><mstefani@winehq.org></a> wrote on 2018-12-12 at 21:28 +0100:</div>
    <blockquote type="cite"
      cite="mid:7c9cc8d2-f5f9-ee22-5a05-b108e6ff83d3@winehq.org">
      <pre class="moz-quote-pre" wrap="">Hello Eberhard,

tab_width needs to be 8. That's a given.</pre>
    </blockquote>
    Done.<br>
    <blockquote type="cite"
      cite="mid:7c9cc8d2-f5f9-ee22-5a05-b108e6ff83d3@winehq.org">
      <pre class="moz-quote-pre" wrap="">
For exiting code the style of the surrounding code trumps. So the indent
and line length settings are just the recommendations for new code but
not necessary true for all files in Wine.

The important question though is:
What will the editors / IDE do with this file?
Will they automatically start to re-indent the whole file being edited
if they see .editorconfig?
That would be counterproductive as unrelated whitespace changes are not
allowed. Of course fixing whitespace issues in modified lines is wanted
and sometimes even expected, depending on the subsystem maintainer.</pre>
    </blockquote>
    <p>From my experience there is no difference in having a
      .editorconfig file vs. settings in the IDE: if you don't have a
      .editorconfig file you have to configure your IDE so that it
      doesn't reformat the whole file, or be careful when you commit
      your change that you don't introduce unwanted whitespace changes.</p>
    <p>The same is true with a .editorconfig file. In all the editors
      and IDEs that I've seen so far you have the option to configure if
      the editor/IDE should use the .editorconfig at all, and if it
      should apply the settings to the entire file or only to
      new/modified code.</p>
    <p>The big advantage of having a .editorconfig file IMO is that a)
      it documents the desired settings in machine readable form, and b)
      it allows occasional or first-time contributors to use the correct
      settings without having to reconfigure the IDE each time you
      switch between different projects.</p>
    <p>Regards,<br>
          Eberhard<br>
    </p>
    <blockquote type="cite"
      cite="mid:7c9cc8d2-f5f9-ee22-5a05-b108e6ff83d3@winehq.org">
      <pre class="moz-quote-pre" wrap="">

bye
        michael


On 12/12/18 10:14 AM, Eberhard Beilharz wrote:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">This allows editors and IDEs to automatically adjust settings to
the coding style prefered by Wine (cf. <a class="moz-txt-link-freetext" href="https://editorconfig.org/">https://editorconfig.org/</a>).

Signed-off-by: Eberhard Beilharz <a class="moz-txt-link-rfc2396E" href="mailto:eb1@sil.org"><eb1@sil.org></a>
---
 .editorconfig | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 .editorconfig

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000000..71dc8633f8
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,11 @@
+root = true
+
+# Defaults
+[*]
+indent_style = space
+indent_size = 4
+tab_width = 4
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = false
+max_line_length = 100

</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
</pre>
    </blockquote>
  </body>
</html>