git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
karthik nayak <karthik.188@gmail.com>
Date
Oct 10, 2024, 16:48 UTC
Message-ID
<CAOLa=ZRRHYwe7=aJogL0=R8SHyPkHeC7C34R3mkR-gmzkRQ9JA@mail.gmail.com>
In-Reply-To
<xmqqttdkoqks.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 17 quoted lines
> Justin Tobler <jltobler@gmail.com> writes:
>
>> On 24/10/09 05:55AM, Karthik Nayak wrote:
>>> 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.
>>
>> The column limit does lead to quite a few false positives. At the same
>> time though, in some ways having a tool point out all the instances it
>> occurs does make it easier to review if any should be addressed.
>>
>> If the goal is to have a CI job that we generally expect to pass, then
>> it makes sense to remove it. I don't feel super strongly either way.
> Is it possible for gatekeeper jobs to complain only on newly added
> violations?

The CI job is indeed only checking the newly added code. We do this using 'git clang-format' which takes in the basecommit as a param. This is in 'ci/run-style-check.sh'.

> Then it is fine to have a limit with a bit of slack,
> say like 96 columns (with 16-column readability slack).
This is a good idea. Let me add change this in the next version.
Previous: Junio C HamanoNext: Karthik Nayak
Message 5 of 34 in “clang-format: fix rules to make the CI job cleaner”
  1. 0/3 clang-format: fix rules to make the CI job cleanerKarthik Nayak, Oct 9, 2024
  2. 1/3 clang-format: don't enforce the column limitKarthik Nayak, Oct 9, 2024
  3. Justin ToblerOct 9, 2024
  4. Junio C HamanoOct 9, 2024
  5. karthik nayakOct 10, 2024
  6. 2/3 clang-format: don't align expressions after linebreaksKarthik Nayak, Oct 9, 2024
  7. 3/3 clang-format: align consecutive macro definitionsKarthik Nayak, Oct 9, 2024
  8. Toon ClaesOct 10, 2024
  9. 0/3 clang-format: fix rules to make the CI job cleanerKarthik Nayak, Oct 12, 2024
  10. 1/3 clang-format: re-adjust line break penaltiesKarthik Nayak, Oct 12, 2024
  11. Toon ClaesOct 14, 2024
  12. Taylor BlauOct 14, 2024
  13. karthik nayakOct 15, 2024
  14. karthik nayakOct 15, 2024
  15. Kyle LippincottOct 14, 2024
  16. karthik nayakOct 15, 2024
  17. Kyle LippincottOct 16, 2024
  18. karthik nayakOct 16, 2024
  19. 2/3 clang-format: align consecutive macro definitionsKarthik Nayak, Oct 12, 2024
  20. Kyle LippincottOct 14, 2024
  21. karthik nayakOct 15, 2024
  22. 3/3 clang-format: don't align expressions after linebreaksKarthik Nayak, Oct 12, 2024
  23. Kyle LippincottOct 14, 2024
  24. karthik nayakOct 15, 2024
  25. 0/2 Subject: clang-format: fix rules to make the CI job cleanerKarthik Nayak, Oct 18, 2024
  26. 1/2 clang-format: re-adjust line break penaltiesKarthik Nayak, Oct 18, 2024
  27. Justin ToblerOct 25, 2024
  28. karthik nayakOct 25, 2024
  29. 2/2 clang-format: align consecutive macro definitionsKarthik Nayak, Oct 18, 2024
  30. Taylor BlauOct 18, 2024
  31. karthik nayakOct 20, 2024
  32. Taylor BlauOct 21, 2024
  33. karthik nayakOct 22, 2024
  34. Taylor BlauOct 22, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.