Skip to contentSkip to conversation

checkpatch: advertise the --fix and --fix-inplace options more

PATCH New [email protected] 1 participant 1 message May 21, 2016 Checkpatch

lore
Share & tools
lore
#0 lore raw

PATCH 153/162 checkpatch: advertise the --fix and --fix-inplace options more

From: Joe Perches <[email protected]>
Subject: checkpatch: advertise the --fix and --fix-inplace options more

The --fix option is relatively unknown and underutilized.

Add some text to show that it's available when style defects are found.

---

 scripts/checkpatch.pl |    8 ++++++++
 1 file changed, 8 insertions(+)
scripts/checkpatch.pl renamed from scripts/checkpatch.pl~checkpatch-advertise-the-fix-and-fix-inplace-options-more +8 -0
diff -puN scripts/checkpatch.pl~checkpatch-advertise-the-fix-and-fix-inplace-options-more scripts/checkpatch.pl
@@ -5975,6 +5975,14 @@ sub process {
 	}
 
 	if ($quiet == 0) {
+		# If there were any defects found and not already fixing them
+		if (!$clean and !$fix) {
+			print << "EOM"
+
+NOTE: For some of the reported defects, checkpatch may be able to
+      mechanically convert to the typical style using --fix or --fix-inplace.
+EOM
+		}
 		# If there were whitespace errors which cleanpatch can fix
 		# then suggest that.
 		if ($rpt_cleaners) {

_