Stream: git-wasmtime

Topic: wasmtime / Issue #1317 Add .editorconfig


view this post on Zulip Wasmtime GitHub notifications bot (Mar 13 2020 at 21:14):

darinmorrison commented on Issue #1317:

It might be a good idea to add a separate section for [*.c] files and perhaps others if necessary.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 13 2020 at 21:51):

sunfishcode commented on Issue #1317:

One thing I'm unclear on about editorconfig files; we already have a .rustfmt file, and we use all default settings; shouldn't we expect editors to either read the .rustfmt file, or at least default to rustfmt's defaults?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 14 2020 at 19:08):

bjorn3 commented on Issue #1317:

.editorconfig is meant to be supported by all editors, not just those that support rust. It also applies to all text files, not only rust files.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 14 2020 at 19:12):

darinmorrison commented on Issue #1317:

@sunfishcode the .rustfmt is good but only applies to Rust files. Other things like .c or .wat or random text files won't get the benefit from that configuration.

The main thing I find useful about having the .editorconfig is that line endings are configured project-wide. I often use windows for development and prefer not to force the editor to LF globally since I sometimes edit system files as well. It's not critical or anything, just nice to have.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2020 at 02:26):

abrown commented on Issue #1317:

I think this might be extra-helpful if it told IDEs to wrap lines to a certain length; I tend to forget to do that for non-Rust files.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2020 at 23:07):

sunfishcode commented on Issue #1317:

For LF line endings, should we add a .gitattributes file containing * text=auto eol=lf? That way git would handle it automatically for all text files, not just files created by editorconfig-aware editors.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2020 at 23:36):

darinmorrison commented on Issue #1317:

Yeah the .gitattributes approach would also work for that. For reference, here is the rust-lang/rust/.gitattributes which does that.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2020 at 23:36):

darinmorrison edited a comment on Issue #1317:

Yeah the .gitattributes approach would also work for that. For reference, here is the rust-lang/rust/.gitattributes which does that.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2020 at 20:31):

sunfishcode commented on Issue #1317:

I submitted #1370 to add a .gitattributes file, following your suggestion.

If anyone has a clear need for a .editorconfig file beyond that, we can add it, but otherwise my sense is to wait until we have one. https://github.com/bytecodealliance/wasmtime/pull/1365 has now removed most of the remaining C++ code from the repo, which further simplifies things.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2020 at 20:59):

darinmorrison commented on Issue #1317:

Sounds good. I'll close this in favor of the other PR.


Last updated: Nov 22 2024 at 16:03 UTC