[PATCH] D135789: Add .editorconfig file

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 13 12:47:55 PDT 2022


beanz added a comment.

In D135789#3854248 <https://reviews.llvm.org/D135789#3854248>, @MaskRay wrote:

> This seems useful as it does apply to a lot of editors. If it were Visual Studio alone I would be unsure whether this passed the bar :)
>
> A lot of `.py` files use 4 space indentation, will `indent_size = 2` be problematic?

We have a mix here. Some python files are 2 and some are 4. I think having the editor formalize on 2 really just means that we set the same default as for C/C++ source, and I think that's probably good.

> For CMake files I don't know a commonly used indentation. Will `indent_size = 2` be problematic?

For CMake we definitely prefer 2-space indent, if there is CMake code differing from that it probably has more to do with unintentional editor wonkiness than anything else.

> Consider whether `indent_size = 2` should only be applied to C/C++ files.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135789/new/

https://reviews.llvm.org/D135789



More information about the llvm-commits mailing list