[LTP] [PATCH v1 3/3] editorconfig: add consistent formatting rules for LTP

Jan Polensky japo@linux.ibm.com
Mon Mar 9 18:20:57 CET 2026


Introduce .editorconfig to keep indentation and whitespace consistent across
editors, preventing accidental reformatting and noisy diffs.

Signed-off-by: Jan Polensky <japo@linux.ibm.com>
---
 .editorconfig | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 .editorconfig

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000000..ee9f49516e53
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+# EditorConfig configuration for LTP
+# https://editorconfig.org/
+
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+# C/Assembly source files, headers, and Makefiles use tabs
+[*.{c,h,mk,S,sh,awk}]
+indent_style = tab
+indent_size = 8
+
+[{Makefile,Makefile.*}]
+indent_style = tab
+indent_size = 8
+
+# Python and Perl scripts use spaces
+[*.{py,pl}]
+indent_style = space
+indent_size = 4
+
+# Documentation files
+[*.{rst,md}]
+indent_style = space
+indent_size = 3
+
+# JSON files
+[*.json]
+indent_style = space
+indent_size = 4
-- 
2.53.0



More information about the ltp mailing list