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

Re: [PATCH 2/6] ci: check formatting of our Rust code

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Oct 29, 2025, 22:54 UTC
Message-ID
<aQKbN157AMJi59rV@szeder.dev>
In-Reply-To
<xmqqms61h0g1.fsf@gitster.g>
On Wed, Oct 08, 2025 at 08:34:22AM -0700, Junio C Hamano wrote:
Show 26 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
> 
> >> ... but I also think we should take this
> >> opportunity to choose the Rust defaults for Rust.  C, Perl, and text
> >> formats like AsciiDoc do not have rigid defaults about indentation
> >> style, tabs vs. spaces, and line length; Rust does.  We wouldn't use
> >> tabs in Rust (the default is four spaces) because we use it everywhere
> >> else, so I think we should take the opportunity to use the Rust defaults
> >> here as well.
> >
> > I am also slightly leaning into the direction of sticking with Rust's
> > default of 100 characters. It's not substantially more than 80, should
> > be reasonable to accommodate for in most modern setups, and sticks with
> > what the remainder of the ecosystem is doing.
> >
> > So for now I'll leave it at 80 characters. But I don't feel strongly
> > about this, so if there is a majority in favor of 80 characters I'm
> > happy to adjust.
> 
> So the question is if we want consistency across files regardless of
> what language they are written in (i.e. 80-columns everywhere) or we
> treat our existing rules a "fallback rules" we have adopted while
> dealing with languages without their own strict rules, and use the
> default for a language with its own rule (i.e. whatever rustfmt
> wants is used for Rust, our own rules still apply to everything
> else)?

Consistency across files regardless of language was great, because I, for one, prefer to use the same editor for all files regardless of language.

I find 100 columns much worse than 80, because on my laptop I can put three 80 columns editors next to each other (and still have a bit of room to spare), but with 100 columns there is only room for two.

Show 10 quoted lines
> I actually am fine with the latter myself.
> 
> If people strongly prefer, I also can be talked into adopting
> slightly wider limit for our fallback rules for everything else, but
> that is probably a separate discussion.  It is a bit unfriendly move
> against folks with aging eyeballs like myself, though.
> 
> Thanks.
> 
> 
Previous: Patrick SteinhardtNext: brian m. carlson
Message 16 of 37 in “ci: improvements to our Rust infrastructure”
  1. 0/6 ci: improvements to our Rust infrastructurePatrick Steinhardt, Oct 7, 2025
  2. 1/6 ci: deduplicate calls to `apt-get update`Patrick Steinhardt, Oct 7, 2025
  3. Karthik NayakOct 7, 2025
  4. Justin ToblerOct 14, 2025
  5. 2/6 ci: check formatting of our Rust codePatrick Steinhardt, Oct 7, 2025
  6. Karthik NayakOct 7, 2025
  7. Patrick SteinhardtOct 7, 2025
  8. Eric SunshineOct 7, 2025
  9. Junio C HamanoOct 7, 2025
  10. Eric SunshineOct 7, 2025
  11. brian m. carlsonOct 7, 2025
  12. Chris TorekOct 7, 2025
  13. Patrick SteinhardtOct 8, 2025
  14. Junio C HamanoOct 8, 2025
  15. Patrick SteinhardtOct 9, 2025
  16. SZEDER GáborOct 29, 2025
  17. brian m. carlsonOct 7, 2025
  18. SZEDER GáborOct 8, 2025
  19. Patrick SteinhardtOct 9, 2025
  20. SZEDER GáborOct 29, 2025
  21. 3/6 rust/varint: add safety commentsPatrick Steinhardt, Oct 7, 2025
  22. brian m. carlsonOct 8, 2025
  23. Patrick SteinhardtOct 8, 2025
  24. 4/6 ci: check for common Rust mistakes via ClippyPatrick Steinhardt, Oct 7, 2025
  25. 5/6 ci: verify minimum supported Rust versionPatrick Steinhardt, Oct 7, 2025
  26. 6/6 rust: support for WindowsPatrick Steinhardt, Oct 7, 2025
  27. 0/6 ci: improvements to our Rust infrastructurePatrick Steinhardt, Oct 15, 2025
  28. 1/6 ci: deduplicate calls to `apt-get update`Patrick Steinhardt, Oct 15, 2025
  29. 2/6 ci: check formatting of our Rust codePatrick Steinhardt, Oct 15, 2025
  30. 3/6 rust/varint: add safety commentsPatrick Steinhardt, Oct 15, 2025
  31. 4/6 ci: check for common Rust mistakes via ClippyPatrick Steinhardt, Oct 15, 2025
  32. 5/6 ci: verify minimum supported Rust versionPatrick Steinhardt, Oct 15, 2025
  33. 6/6 rust: support for WindowsPatrick Steinhardt, Oct 15, 2025
  34. Ezekiel NewrenNov 20, 2025
  35. Johannes SchindelinNov 21, 2025
  36. Junio C HamanoNov 21, 2025
  37. Junio C HamanoOct 15, 2025

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.