lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250729200402.35241-1-contact@arnaud-lcm.com>
Date: Tue, 29 Jul 2025 21:04:02 +0100
From: Arnaud Lecomte <contact@...aud-lcm.com>
To: joe@...ches.com
Cc: a.hindborg@...nel.org,
	alex.gaynor@...il.com,
	aliceryhl@...gle.com,
	apw@...onical.com,
	bjorn3_gh@...tonmail.com,
	boqun.feng@...il.com,
	dakr@...nel.org,
	dwaipayanray1@...il.com,
	gary@...yguo.net,
	linux-kernel@...r.kernel.org,
	lossin@...nel.org,
	lukas.bulwahn@...il.com,
	ojeda@...nel.org,
	rust-for-linux@...r.kernel.org,
	tmgross@...ch.edu,
	Arnaud Lecomte <contact@...aud-lcm.com>
Subject: [PATCH 3/3] checkpatch.pl: --fix support for `//` comments rust
 private items

Extend the Rust private item documentation checker (added in the previous
patch) to support automatic fixes when the `--fix` option is enabled.

Signed-off-by: Arnaud Lecomte <contact@...aud-lcm.com>
---
 scripts/checkpatch.pl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index ac403d270eb4..d01d993d8a9f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3069,6 +3069,9 @@ sub process {
             	for (my $i = $start_l; $i <= $end_l; $i++) {
                 	next unless $rawlines[$i - 1] =~ m@^\+//([^/].*)$@;
                 	push @comment_lines, $rawlines[$i - 1];
+					if($fix) {
+						$fixed[$i - 1] =~ s/^\+(\/\/)/+$1\//;
+					}
 				}
 				my $formatted_comments = join("", map {
 					s/\n$//;
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ