diff mbox series

[1/3] clang-format: don't enforce the column limit

Message ID CAOLa=ZQrCxU_tUcFsrAjTxq2ufCNk=zox-fsa_KMenyCJr5gUg@mail.gmail.com (mailing list archive)
State Superseded
Headers show
Series clang-format: fix rules to make the CI job cleaner | expand

Commit Message

karthik nayak Oct. 9, 2024, 12:51 p.m. UTC
The current value for the column limit is set to 80. While this is as
expected, we often prefer readability over this strict limit. This means
it is common to find code which extends over 80 characters. So let's
change the column limit to be 0 instead. This ensures that the formatter
doesn't complain about code strictly not following the column limit.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
---
 .clang-format | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

karthik nayak Oct. 9, 2024, 12:58 p.m. UTC | #1
Karthik Nayak <karthik.188@gmail.com> writes:

> The current value for the column limit is set to 80. While this is as
> expected, we often prefer readability over this strict limit. This means
> it is common to find code which extends over 80 characters. So let's
> change the column limit to be 0 instead. This ensures that the formatter
> doesn't complain about code strictly not following the column limit.
>

Seems like this mail got double posted, please ignore. The original
thread [1] has the full set of patches.

[1]: https://lore.kernel.org/git/CAOLa=ZRvFBhageS65uE5enzLBz7H_CAvvnEcPsi_QAi0exRx2w@mail.gmail.com/#r
diff mbox series

Patch

diff --git a/.clang-format b/.clang-format
index 41969eca4b..38910a3a53 100644
--- a/.clang-format
+++ b/.clang-format
@@ -12,7 +12,11 @@  UseTab: Always
 TabWidth: 8
 IndentWidth: 8
 ContinuationIndentWidth: 8
-ColumnLimit: 80
+
+# While we recommend keeping column limit to 80, we don't want to
+# enforce it as we generally are more lenient with this rule and
+# prefer to prioritize readability.
+ColumnLimit: 0

 # C Language specifics
 Language: Cpp