From: Jan Polensky <japo@linux.ibm.com>
To: chrubis@suse.cz, pvorel@suse.cz
Cc: Linux Test Project <ltp@lists.linux.it>
Subject: [LTP] [PATCH v2 1/1] editorconfig: add consistent formatting rules for LTP
Date: Mon, 16 Mar 2026 14:03:20 +0100 [thread overview]
Message-ID: <20260316130320.138328-1-japo@linux.ibm.com> (raw)
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>
---
Changes since v1 (thanks Petr):
- License identifier: GPL-2.0 -> GPL-2.0-or-later
- Drop awk
- Treat Python/Perl special files
- indent_size=4 for *.{c,h,S,sh} and ver_linux
- Fix indent_size for .rst/.md to 4
.editorconfig | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 .editorconfig
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000000..ee67666d49c4
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+root = true
+
+# Default for all files
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+# C/Assembly source files, headers, and shell files use tabs
+[{*.{c,h,S,sh},ver_linux}]
+indent_style = tab
+indent_size = 4
+
+[{Makefile,Makefile.*,*.{mk.in,mk}}]
+indent_style = tab
+indent_size = 8
+
+# Python and Perl: default to tabs (most test files use tabs, checkpatch.pl which we modify)
+[*.{py,pl}]
+indent_style = tab
+indent_size = 8
+
+# Exceptions use spaces: Python (Sphinx, scripts), Perl (checkbashisms.pl vendored)
+[{doc/conf.py,scripts/*.py,scripts/checkbashisms.pl}]
+indent_style = space
+indent_size = 4
+
+# Documentation files
+[*.{rst,md}]
+indent_style = space
+indent_size = 4
+
+# JSON files
+[*.json]
+indent_style = space
+indent_size = 4
--
2.53.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next reply other threads:[~2026-03-16 13:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 13:03 Jan Polensky [this message]
2026-03-27 10:53 ` [LTP] [PATCH v2 1/1] editorconfig: add consistent formatting rules for LTP Andrea Cervesato via ltp
2026-03-27 12:33 ` Petr Vorel
2026-03-27 13:39 ` Andrea Cervesato via ltp
2026-03-27 17:43 ` Petr Vorel
2026-03-27 18:25 ` Jan Polensky
2026-03-27 18:59 ` Petr Vorel
2026-03-27 15:29 ` Petr Vorel
2026-03-27 17:55 ` Jan Polensky
2026-03-27 18:25 ` Petr Vorel
2026-03-30 7:23 ` Andrea Cervesato via ltp
2026-03-31 19:59 ` Jan Polensky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260316130320.138328-1-japo@linux.ibm.com \
--to=japo@linux.ibm.com \
--cc=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.