aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-09-16 10:04:40 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2024-09-16 10:10:23 +0100
commiteb67e2396f3ee834bf3a8299f5b6d93ba82d3950 (patch)
tree06f72b4d3e3d7512f59613264f4596871051d383
parent48a0f6937d7c1faadf16f5ff7bd227a8392ddfe8 (diff)
downloadgcc-eb67e2396f3ee834bf3a8299f5b6d93ba82d3950.zip
gcc-eb67e2396f3ee834bf3a8299f5b6d93ba82d3950.tar.gz
gcc-eb67e2396f3ee834bf3a8299f5b6d93ba82d3950.tar.bz2
libstdc++: Add .editorconfig files
These config files set default formatting behaviour for a large number of common editors, see https://editorconfig.org The root=true setting in libstdc++-v3/.editorconfig prevents looking in parent directories for additional settings. If we add a .editorconfig at the top-level we might want to use root=true there instead, and allow libstdc++-v3/.editorconfig to inherit some some settings from there (and only override things we want to do differently). libstdc++-v3/ChangeLog: * .editorconfig: New file. * include/std/.editorconfig: New file.
-rw-r--r--libstdc++-v3/.editorconfig38
-rw-r--r--libstdc++-v3/include/std/.editorconfig10
2 files changed, 48 insertions, 0 deletions
diff --git a/libstdc++-v3/.editorconfig b/libstdc++-v3/.editorconfig
new file mode 100644
index 0000000..88107ce
--- /dev/null
+++ b/libstdc++-v3/.editorconfig
@@ -0,0 +1,38 @@
+# top-most EditorConfig file for libstdc++-v3
+root = true
+
+[*]
+end_of_line = lf
+insert_final_newline = true
+
+[*.h,*.cc]
+charset = utf-8
+indent_style = tab
+indent_size = 2
+tab_width = 8
+trim_trailing_whitespace = true
+
+[Makefile*,ChangeLog*]
+indent_style = tab
+indent_size = 8
+trim_trailing_whitespace = true
+
+[ChangeLog*]
+charset = utf-8
+
+[*.xml]
+charset = utf-8
+indent_size = 2
+tab_width = 8
+trim_trailing_whitespace = true
+
+[*.py]
+indent_style = space
+indent_size = 4
+trim_trailing_whitespace = true
+
+[*.exp]
+indent_style = tab
+indent_size = 4
+tab_width = 8
+trim_trailing_whitespace = true
diff --git a/libstdc++-v3/include/std/.editorconfig b/libstdc++-v3/include/std/.editorconfig
new file mode 100644
index 0000000..97ca192
--- /dev/null
+++ b/libstdc++-v3/include/std/.editorconfig
@@ -0,0 +1,10 @@
+# Inherit settings from EditorConfig files above this dir.
+root = false
+
+# All files under this directory are C++ headers.
+[*]
+charset = utf-8
+indent_style = tab
+indent_size = 2
+tab_width = 8
+trim_trailing_whitespace = true