Skip to contentSkip to conversation

clang-format: Fix: Maximum line length is now 100

PATCH In review Alex Dewar 2 participants 3 messages Aug 18, 2020 Clang-format file

lore
Share & tools
lore

Alex Dewar

author
#0 lore raw

PATCH 1/1 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.

---
 .clang-format | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.clang-format +1 -1
index a0a96088c74f..2b314a14a658 100644
@@ -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
Signature · 1 line
2.28.0
#1 lore raw
Quoted 3 lines · Alex Dewar

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.

[]

.clang-format

Quoted 1 line
.clang-format +0 -0

[]

.clang-format BreakConstructorInitializersBeforeComma: false · line 55

Quoted 6 lines
.clang-format +1 -1
@@ -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]/

author
#2 lore raw
Quoted 16 lines · Joe Perches
Quoted 3 lines · Alex Dewar

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.

[]

.clang-format

Quoted 1 line
.clang-format +0 -0

[]

.clang-format BreakConstructorInitializersBeforeComma: false · line 55

Quoted 6 lines
.clang-format +1 -1
@@ -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.

Quoted 9 lines

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