From 8c14c6bd0bd0b47fa1eb16993439404139a7086c Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 17 Dec 2020 17:38:05 +0000 Subject: [PATCH] Add .editorconfig file A .editorconfig file allows many editors (e.g. Visual Studio Code) to autoconfigure themselves based on its contents. This avoids some formatting issues in PRs because editors will do the right thing by default with a .editorconfig file available in the repo. --- .editorconfig | 10 ++++++++++ .gitattributes | 1 + 2 files changed, 11 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..e5e7e30ed8 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +charset = utf-8 +insert_final_newline = true +trim_trailing_whitespace = true + +[{CMakeLists.txt,*.cmake,*.rst}] +indent_size = 2 +indent_style = space diff --git a/.gitattributes b/.gitattributes index 3da2d60f54..fac38dfd74 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,6 @@ .git* export-ignore .hooks* export-ignore +.editorconfig export-ignore # Custom attribute to mark sources as using our C code style. [attr]our-c-style whitespace=tab-in-indent format.clang-format-6.0