[clang-tools-extra] [clang-tidy][NFC] Add `.editorconfig` for `.rst` files (PR #167269)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 11 04:04:49 PST 2025
https://github.com/zeyi2 updated https://github.com/llvm/llvm-project/pull/167269
>From 85c41652d2256af9861d66598c991430cf70979a Mon Sep 17 00:00:00 2001
From: mtx <mitchell.xu2 at gmail.com>
Date: Mon, 10 Nov 2025 13:29:27 +0800
Subject: [PATCH 1/3] [clang-tidy][NFC] Add `.editorconfig` for `.rst` files
---
clang-tools-extra/docs/.editorconfig | 8 ++++++++
1 file changed, 8 insertions(+)
create mode 100644 clang-tools-extra/docs/.editorconfig
diff --git a/clang-tools-extra/docs/.editorconfig b/clang-tools-extra/docs/.editorconfig
new file mode 100644
index 0000000000000..74f96cdf09b79
--- /dev/null
+++ b/clang-tools-extra/docs/.editorconfig
@@ -0,0 +1,8 @@
+[clang-tidy/checks/**/*.rst]
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+end_of_line = lf
+indent_style = space
+indent_size = 2
+max_line_length = 80
>From 56729ed872f3aa485ec94e58de691ea180d0494e Mon Sep 17 00:00:00 2001
From: mtx <mitchell.xu2 at gmail.com>
Date: Mon, 10 Nov 2025 18:08:41 +0800
Subject: [PATCH 2/3] Tiny fix
---
.../docs/{ => clang-tidy/checks}/.editorconfig | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
rename clang-tools-extra/docs/{ => clang-tidy/checks}/.editorconfig (71%)
diff --git a/clang-tools-extra/docs/.editorconfig b/clang-tools-extra/docs/clang-tidy/checks/.editorconfig
similarity index 71%
rename from clang-tools-extra/docs/.editorconfig
rename to clang-tools-extra/docs/clang-tidy/checks/.editorconfig
index 74f96cdf09b79..08694705c38d8 100644
--- a/clang-tools-extra/docs/.editorconfig
+++ b/clang-tools-extra/docs/clang-tidy/checks/.editorconfig
@@ -1,8 +1,10 @@
-[clang-tidy/checks/**/*.rst]
+[{**/*.rst,*.rst}]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
indent_style = space
-indent_size = 2
max_line_length = 80
+
+[list.rst]
+max_line_length = unset
>From d2114c82276bd7e46299f71d1dd051191413fa58 Mon Sep 17 00:00:00 2001
From: mtx <mitchell.xu2 at gmail.com>
Date: Tue, 11 Nov 2025 20:01:27 +0800
Subject: [PATCH 3/3] Add editor config for clang-tidy files
---
clang-tools-extra/clang-tidy/.editorconfig | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 clang-tools-extra/clang-tidy/.editorconfig
diff --git a/clang-tools-extra/clang-tidy/.editorconfig b/clang-tools-extra/clang-tidy/.editorconfig
new file mode 100644
index 0000000000000..6060bb1115017
--- /dev/null
+++ b/clang-tools-extra/clang-tidy/.editorconfig
@@ -0,0 +1,7 @@
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+
+[**/*.{cpp,h}]
+max_line_length = 80
\ No newline at end of file
More information about the cfe-commits
mailing list