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

From: Miguel Ojeda
Date: Tue Mar 04 2025 - 16:00:29 EST


On Tue, Mar 4, 2025 at 9:51 PM Guilherme Giacomo Simoes
<trintaeoitogc@xxxxxxxxx> wrote:
>
> hostprog like rustfmt?

No, Andreas means a script written in Rust, rather than a binary that
comes from the toolchain.

I think it could be a good idea (it would be lovely to write the
checker in Rust -- I also had a checker bot in Python from the old
days of the old `rust` branch in GitHub), but `checkpatch.pl` doesn't
need a built kernel, so it would be a disadvantage or at least a
difference w.r.t. the usual `checkpatch.pl`, and we may not be able to
call it from `checkpatch.pl`.

> About this, Daniel Sedlak say:
> "I think we could fight with the code formatting, because when it comes
> to the rust macros, rustfmt is often very confused and we could end up
> with variations like:

Did you check? i.e. is it something we noticed, or something that
generally happens but maybe not in this case? Is there a way to
workaround or disable that (e.g. a `rustfmt` config value)?

Thanks!

Cheers,
Miguel