[PATCH v8 0/2] modularize Rust lints and add RUST_UNWRAP check
From: Jason Hall
Date: Sat Feb 07 2026 - 16:08:29 EST
This series moves Rust-specific linting logic into a separate file to
prevent further growth of the main scripts/checkpatch.pl script and
introduces a new lint to enforce safety standards.
The first patch creates the infrastructure for scripts/rust_checkpatch.pl
and adds a conditional loading hook in the main checkpatch script. It
also updates the MAINTAINERS file to track this new file.
The second patch introduces the RUST_UNWRAP lint, which warns against
the use of .unwrap() and .expect() unless they are accompanied by a
'// PANIC:' justification comment.
Jason Hall (2):
scripts: checkpatch: move Rust-specific lints to separate file
scripts: checkpatch: add RUST_UNWRAP lint
MAINTAINERS | 22 ++++++++++++++--------
scripts/checkpatch.pl | 14 ++++++++++++++
scripts/rust_checkpatch.pl | 30 ++++++++++++++++++++++++++++++
3 files changed, 58 insertions(+), 8 deletions(-)
create mode 100644 scripts/rust_checkpatch.pl
--
2.43.0