Re: [PATCH V6 2/2] checkpatch: check format of Vec<String> in modules

From: Miguel Ojeda
Date: Thu Mar 06 2025 - 06:44:09 EST


On Thu, Mar 6, 2025 at 2:59 AM Guilherme Giacomo Simoes
<trintaeoitogc@xxxxxxxxx> wrote:
>
> I don't know if I really understand how this would is do.

Do not worry about it for this series -- it is something for the future.

> The rustfmt have a array_width parameter [1], but with this, all arrays in rust
> code will have the formatting that we set. (In this case, is 1 per line).

Yeah, I was thinking more of something like `skip_macro_invocations`
(but it is unstable) or perhaps one like `format_macro_*` that refers
to arrays within macros or similar (but I don't think it exists yet).
I added the former to our wishlist at
https://github.com/Rust-for-Linux/linux/issues/398, anyway, since I
suspect it could be useful eventually.

In any case, without changing the configuration, i.e. the current
status, what happens in the different cases? e.g. 1 item, 2 items, 10
items...?

Thanks!

Cheers,
Miguel