All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v3 1/1] editorconfig: add consistent formatting rules for LTP
@ 2026-03-31 20:00 Jan Polensky
  2026-04-03  3:23 ` Li Wang via ltp
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jan Polensky @ 2026-03-31 20:00 UTC (permalink / raw)
  To: chrubis, pvorel; +Cc: Linux Test Project

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 v2:
- Use kernel-style tabs for C/ASM/shell. (Thanks Andrea, Petr)
- Split Python/Perl indentation: *.py uses 4 spaces; *.pl keeps tabs.
  (Thanks Andrea)

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 | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 .editorconfig

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000000..b09145a3332f
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,43 @@
+# 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
+tab_width = 8
+
+# C/Assembly source files, headers, and shell files use tabs
+[{*.{c,h,S,sh},ver_linux}]
+indent_style = tab
+indent_size = tab
+
+[{Makefile,Makefile.*,*.{mk.in,mk}}]
+indent_style = tab
+indent_size = tab
+
+[*.py]
+indent_style = space
+indent_size  = 4
+
+[*.pl]
+indent_style = tab
+indent_size = tab
+
+# 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH v3 1/1] editorconfig: add consistent formatting rules for LTP
  2026-03-31 20:00 [LTP] [PATCH v3 1/1] editorconfig: add consistent formatting rules for LTP Jan Polensky
@ 2026-04-03  3:23 ` Li Wang via ltp
  2026-04-03  3:27   ` Li Wang via ltp
  2026-04-03  3:38 ` Li Wang via ltp
  2026-04-15 11:46 ` Andrea Cervesato via ltp
  2 siblings, 1 reply; 5+ messages in thread
From: Li Wang via ltp @ 2026-04-03  3:23 UTC (permalink / raw)
  To: Jan Polensky; +Cc: Linux Test Project

This is a nice improvement, patch merged, thanks!

-- 
Regards,
Li Wang


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH v3 1/1] editorconfig: add consistent formatting rules for LTP
  2026-04-03  3:23 ` Li Wang via ltp
@ 2026-04-03  3:27   ` Li Wang via ltp
  0 siblings, 0 replies; 5+ messages in thread
From: Li Wang via ltp @ 2026-04-03  3:27 UTC (permalink / raw)
  To: Jan Polensky; +Cc: Linux Test Project

> This is a nice improvement, patch merged, thanks!

Oh, sorry, I actually merged another patch, but wrongly replied to this email.

  https://lists.linux.it/pipermail/ltp/2026-April/047395.html


--
Regards,
Li Wang


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH v3 1/1] editorconfig: add consistent formatting rules for LTP
  2026-03-31 20:00 [LTP] [PATCH v3 1/1] editorconfig: add consistent formatting rules for LTP Jan Polensky
  2026-04-03  3:23 ` Li Wang via ltp
@ 2026-04-03  3:38 ` Li Wang via ltp
  2026-04-15 11:46 ` Andrea Cervesato via ltp
  2 siblings, 0 replies; 5+ messages in thread
From: Li Wang via ltp @ 2026-04-03  3:38 UTC (permalink / raw)
  To: Jan Polensky; +Cc: Linux Test Project

On Tue, Mar 31, 2026 at 10:00:26PM +0200, Jan Polensky wrote:
> 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>

Woo! I replied to the wrong post, but I didn't say anything wrong.
This patch is also very good.

I would leave Petr or Andrea to merge it.
Anyway:

Reviewed-by: Li Wang <liwang@redhat.com>

-- 
Regards,
Li Wang


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH v3 1/1] editorconfig: add consistent formatting rules for LTP
  2026-03-31 20:00 [LTP] [PATCH v3 1/1] editorconfig: add consistent formatting rules for LTP Jan Polensky
  2026-04-03  3:23 ` Li Wang via ltp
  2026-04-03  3:38 ` Li Wang via ltp
@ 2026-04-15 11:46 ` Andrea Cervesato via ltp
  2 siblings, 0 replies; 5+ messages in thread
From: Andrea Cervesato via ltp @ 2026-04-15 11:46 UTC (permalink / raw)
  To: Jan Polensky; +Cc: Linux Test Project

Merged thanks!

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-04-15 11:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31 20:00 [LTP] [PATCH v3 1/1] editorconfig: add consistent formatting rules for LTP Jan Polensky
2026-04-03  3:23 ` Li Wang via ltp
2026-04-03  3:27   ` Li Wang via ltp
2026-04-03  3:38 ` Li Wang via ltp
2026-04-15 11:46 ` Andrea Cervesato via ltp

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.