[LTP] [PATCH v2 1/1] editorconfig: add consistent formatting rules for LTP

Jan Polensky japo@linux.ibm.com
Fri Mar 27 19:25:57 CET 2026


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.

Kind regards,
Jan


More information about the ltp mailing list