From: "Eregon (Benoit Daloze)" Date: 2022-07-04T20:02:00+00:00 Subject: [ruby-core:109137] [Ruby master Misc#18891] Expand tabs in C code Issue #18891 has been updated by Eregon (Benoit Daloze). Thank you for the clear and precise issue. (2) seems very obviously the way, and it's amazing it has not been done yet. This is the #1 problem for new (and some of the existing as well) contributors to CRuby.. If CRuby does not do this, it is explicitly rejecting new contributors for no good reasons. (IMHO mixing spaces and tabs has no sense nowadays, it's an antique legacy non-sense practice with zero advantages, and there is no valid reason to keep that monster alive) ---------------------------------------- Misc #18891: Expand tabs in C code https://bugs.ruby-lang.org/issues/18891#change-98278 * Author: k0kubun (Takashi Kokubun) * Status: Open * Priority: Normal ---------------------------------------- # Problem There's no way to handle tab/space-mixed indentation of CRuby's C code properly in VSCode. # Suggested solutions 1. You tell me how to do that in VSCode. * In VSCode, there seems to be no native feature to show tabs as 8 spaces while still indenting with 4 spaces. At least https://github.com/microsoft/vscode/issues/42740 is still open. * @alanwu built https://github.com/XrXr/vscode-tabs-are-two-indents exactly for this purpose, but even with the extension, it still seems to wrongly detect an indentation level on new lines. 2. Expand all tabs in most of the C code at once and add the commit to `.git-blame-ignore-revs` * pros: GitHub and `git blame --ignore-revs-file` support it. Unlike option 3, commit logs and `.git-blame-ignore-revs` can be short. * cons: It might be a bit difficult to find out which C files shouldn't be a target. Bare `git blame` could be inconvenient. 3. Allow expanding all tabs in each C file as we want and manage the list of such commits in `.git-blame-ignore-revs` * pros: GitHub and `git blame --ignore-revs-file` support it. You don't introduce unnecessary changes to files you don't care about. * cons: We might see too many commits for this in the commit history. Bare `git blame` could be inconvenient for such files. 4. Discourage contributions to CRuby from VSCode users. (proposed by @graywolf) # Out of scope I'm not interested in discussing the adoption of clang-format. It would change a lot of things that are not related to the problem. # Past discussion https://bugs.ruby-lang.org/issues/16112 touched this topic before, but we haven't discussed `--ignore-revs-file` so much. I also didn't know VSCode still can't deal with it in 2022 (as I've been using Vim). -- https://bugs.ruby-lang.org/ Unsubscribe: