Re: [PATCH v6] scripts: checkpatch: move Rust-specific lints to separate file

From: Miguel Ojeda

Date: Sat Feb 07 2026 - 11:07:42 EST


On Sat, Feb 7, 2026 at 4:56 PM Jason Hall <jason.kei.hall@xxxxxxxxx> wrote:
>
> Link: https://github.com/Rust-for-linux/linux/issues/1191

I guess the link doesn't hurt, but the link is a bit tangential for
this patch (unlike the other one, of course).

> -# (c) 2026, Jason K. Hall <jason.kei.hall@xxxxxxxxx>
> +# (c) 2026, Jason Hall <jason.kei.hall@xxxxxxxxx>

Unrelated change?

> - # check for Rust unwrap/expect
> - if ($line =~ /^\+/) {
> - if ($line =~ /(?:\.|::)(?:unwrap|expect)\s*\(/ &&
> - $rawline !~ /\/\/\s*PANIC:/ &&
> - $line !~ /^\+\s*\/\// &&
> - $line !~ /^\+\s*assert/) {
> - return ("RUST_UNWRAP",
> - "Avoid unwrap() or expect() in Rust code; use proper error handling (Result) or justify with a '// PANIC: ...' comment.\n" . $herecurr);
> - }
> - }

This diff seems to be based on the previous patches. Each version of a
series should be a rebase, not a stack.

Thanks!

Cheers,
Miguel