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

2 messages from 2024-10-09 to 2024-10-09. Participants: Karthik Nayak.
Thread: https://gitlist.dev/t/62295

## Karthik Nayak, 2024-10-09 12:51

Subject: [PATCH 1/3] clang-format: don't enforce the column limit
Message-ID: <CAOLa=ZQrCxU_tUcFsrAjTxq2ufCNk=zox-fsa_KMenyCJr5gUg@mail.gmail.com>
URL: https://gitlist.dev/e/CAOLa%3DZQrCxU_tUcFsrAjTxq2ufCNk%3Dzox-fsa_KMenyCJr5gUg%40mail.gmail.com
In-Reply-To: <20241009125109.24422-1-karthik.188@gmail.com>

```
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(-)

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
-- 
2.46.2

```

## Karthik Nayak, 2024-10-09 12:58

Subject: Re: [PATCH 1/3] clang-format: don't enforce the column limit
Message-ID: <CAOLa=ZTY+XYQE8GRz9qigDqiu=oJUhSqEGhXevkuW_tqaoHyxA@mail.gmail.com>
URL: https://gitlist.dev/e/CAOLa%3DZTY%2BXYQE8GRz9qigDqiu%3DoJUhSqEGhXevkuW_tqaoHyxA%40mail.gmail.com
In-Reply-To: <CAOLa=ZQrCxU_tUcFsrAjTxq2ufCNk=zox-fsa_KMenyCJr5gUg@mail.gmail.com>

```
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

```
