[PATCH v2 1/4] clang-format: should format with 2 space and do not usage tab

Xi Ruoyao xry111@xry111.site
Wed Jun 21 07:13:14 GMT 2023


On Wed, 2023-06-21 at 14:55 +0800, 罗勇刚(Yonggang Luo) wrote:
> > Because the existing code uses one tab for 8 spaces.  Glibc has its own
> > coding standard, not "what you prefer".
> 
> I am also talking about the existing code, so the conclusion is the existing code 
> is not consistent, some use one tab for 8 spaces, some use spaces directly

Anyway "TabWidth: 2" is wrong.  If you want to avoid tab at all, the
TabWidth setting is irrelevant and should be removed.

We already have "UseTab: Always" and "IndentWidth: 2", these matches the
description of Zack.  As the patch adding .clang-format had been
reviewed (the commit adding it even contains an R-b tag from Carlos), it
implies the current consensus for new code is to *always* tabs for 8
spaces.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University


More information about the Libc-alpha mailing list