[PATCH 1/3] checkpatch.pl: Add warning for // comments on private Rust items
From: Arnaud Lecomte
Date: Tue Jul 29 2025 - 15:56:49 EST
Hi,
Background
----------
The Rust-for-Linux project currently lacks enforcement of documentation for private Rust items,
as highlighted in https://github.com/Rust-for-Linux/linux/issues/1157.
While rustc already lints missing documentation for public items, private items remain unchecked.
This patch series aims to close that gap by ensuring proper documentation practices
for private Rust items in the kernel as mentioned in the coding
guidelines for the Rust linux kernel: Documentation/rust/coding-guidelines.rst.
The actual solution comes in several parts
------------------------------------------
1) Patch 1 : Implements detection logic to emit warnings for improperly
documented private Rust items (e.g., // comments instead of ///)
through a set of heuristics.
2) Patch 2 : Adds an auto-fix mechanism via the --fix option to help
developers correct documentation issues.
Link: https://github.com/Rust-for-Linux/linux/issues/1157
Signed-off-by: Arnaud Lecomte <contact@xxxxxxxxxxxxxx>
--
2.43.0
--
2.43.0