All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Jan Polensky <japo@linux.ibm.com>
Cc: Linux Test Project <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH v2 1/1] editorconfig: add consistent formatting rules for LTP
Date: Fri, 27 Mar 2026 19:59:51 +0100	[thread overview]
Message-ID: <20260327185951.GA1123044@pevik> (raw)
In-Reply-To: <acbLtetvCPGG89-y@li-276bd24c-2dcc-11b2-a85c-945b6f05615c.ibm.com>

> On Fri, Mar 27, 2026 at 06:43:38PM +0100, Petr Vorel wrote:
> > > Hi Petr,

> > > > FYI I asked for 4 in v1 [1], Jan had originally 8 and I'm ok with following
> > > > kernel. It's just my personal preference to display tab as 4 spaces and not 8
> > > > (IMHO editorconfig plugins don't allow certain setup to be overwritten).

> > > Sorry I missed that. I'm just wondering if editor configuration is applied
> > > only for visualization or also for typing. If it's applied for typing then we
> > > can't use 4 chars, otherwise we will have many issues with checkpatch.pl when
> > > verifying the source code.

> > To be honest I don't know (I haven't installed the plugin for my editor yet).
> > But I'd suspect that on indent_style = tab it just adds a tab and indent_size = 8
> > is only the representation.

> > https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties#indent_size

> > 	Indentation Size (in single-spaced characters)

> > 	Possible Values

> > 		an integer
> > 		tab

> > 	If indent_size equals to tab, the indent_size will be set to the tab size,
> > 	which should be tab_width if tab_width is specified, or the tab size set by
> > 	editor if tab_width is not specified.

> > I wonder if it worked for us to set indent_size = unset for all indent_style = tab
> > (of course not for indent_style = space).

> > https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties#current-universal-properties

> > 	For any property, a value of unset is to remove the effect of that property,
> > 	even if it has been set before. For example, add indent_size = unset to undefine
> > 	indent_size property (and use editor default).

> > @Jan?

> > Kind regards,
> > Petr
> Hi Petr,

> Good catch, the EditorConfig wiki is explicit here:

> - indent_size can be an integer or tab.
> - If indent_size = tab, then indent_size becomes the tab size:
>   tab_width if set, otherwise the editor’s default tab size.
> - Any property can be set to unset to remove its effect (so the editor
>   default is used).

> So yes: we could do indent_style = tab together with
> indent_size = unset if the goal is “tabs, but don’t prescribe a
> width”.
> If we want consistent visual width/alignment across editors, a more
> explicit setup would be indent_size = tab plus tab_width = 8.

Hopefully all editors have meaningful default therefore I'd be for not setting
it. But not a strong requirement if others want to have it specified.

Kind regards,
Petr

> Kind regards,
> Jan

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

  reply	other threads:[~2026-03-27 19:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 13:03 [LTP] [PATCH v2 1/1] editorconfig: add consistent formatting rules for LTP Jan Polensky
2026-03-27 10:53 ` 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 [this message]
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=20260327185951.GA1123044@pevik \
    --to=pvorel@suse.cz \
    --cc=japo@linux.ibm.com \
    --cc=ltp@lists.linux.it \
    /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.