2020-08-18 16:29:33

by Alex Dewar

[permalink] [raw]
Subject: [PATCH] clang-format: Fix: Maximum line length is now 100

Since commit bdc48fa11e46 ("checkpatch/coding-style: deprecate 80-column
warning") the kernel style is now for lines to be a maximum of 100 rather
than 80 columns. Update .clang-format accordingly.

Signed-off-by: Alex Dewar <[email protected]>
---
.clang-format | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.clang-format b/.clang-format
index a0a96088c74f..2b314a14a658 100644
--- a/.clang-format
+++ b/.clang-format
@@ -52,7 +52,7 @@ BreakConstructorInitializersBeforeComma: false
#BreakConstructorInitializers: BeforeComma # Unknown to clang-format-4.0
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
-ColumnLimit: 80
+ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
#CompactNamespaces: false # Unknown to clang-format-4.0
ConstructorInitializerAllOnOneLineOrOnePerLine: false
--
2.28.0


2020-08-18 16:55:10

by Alex Dewar

[permalink] [raw]
Subject: Re: [PATCH] clang-format: Fix: Maximum line length is now 100

On Tue, Aug 18, 2020 at 09:52:20AM -0700, Joe Perches wrote:
> On Tue, 2020-08-18 at 17:24 +0100, Alex Dewar wrote:
> > Since commit bdc48fa11e46 ("checkpatch/coding-style: deprecate 80-column
> > warning") the kernel style is now for lines to be a maximum of 100 rather
> > than 80 columns. Update .clang-format accordingly.
> []
> > diff --git a/.clang-format b/.clang-format
> []
> > @@ -52,7 +52,7 @@ BreakConstructorInitializersBeforeComma: false
> > #BreakConstructorInitializers: BeforeComma # Unknown to clang-format-4.0
> > BreakAfterJavaFieldAnnotations: false
> > BreakStringLiterals: false
> > -ColumnLimit: 80
> > +ColumnLimit: 100
>
> No thank you.
>
> 100 is used for exceptional line length, not
> for reformatting all lines up to 100 chars.
>
> See the previous discussion about the same patch
> submitted earlier in June:
>
> https://lore.kernel.org/lkml/[email protected]/
>
>

Ahh, my mistake. Thanks for getting back to me anyhoo.

Alex

2020-08-18 16:55:25

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH] clang-format: Fix: Maximum line length is now 100

On Tue, 2020-08-18 at 17:24 +0100, Alex Dewar wrote:
> Since commit bdc48fa11e46 ("checkpatch/coding-style: deprecate 80-column
> warning") the kernel style is now for lines to be a maximum of 100 rather
> than 80 columns. Update .clang-format accordingly.
[]
> diff --git a/.clang-format b/.clang-format
[]
> @@ -52,7 +52,7 @@ BreakConstructorInitializersBeforeComma: false
> #BreakConstructorInitializers: BeforeComma # Unknown to clang-format-4.0
> BreakAfterJavaFieldAnnotations: false
> BreakStringLiterals: false
> -ColumnLimit: 80
> +ColumnLimit: 100

No thank you.

100 is used for exceptional line length, not
for reformatting all lines up to 100 chars.

See the previous discussion about the same patch
submitted earlier in June:

https://lore.kernel.org/lkml/[email protected]/