From: Andi Kleen <andi@firstfloor.org>
To: linux-kernel@vger.kernel.org
Cc: apw@shadowen.org, akpm@osdl.org
Subject: [PATCH] Deprecate checkpatch.pl --file
Date: Tue, 8 Jan 2008 17:14:03 +0100 [thread overview]
Message-ID: <20080108161403.GA11632@basil.nowhere.org> (raw)
Deprecate checkpatch.pl --file mode; add warning; add --file-force
As discussed on linux-kernel checkpatch.pl only patches for whole
files have a significant cost for the maintenance process.
Better such changes should be only
done together with other changes. Add a explicit warning about
this; deprecate --file and add a --file-force instead.
Signed-off-by: Andi Kleen <ak@suse.de>
Index: linux/scripts/checkpatch.pl
===================================================================
--- linux.orig/scripts/checkpatch.pl
+++ linux/scripts/checkpatch.pl
@@ -21,6 +21,7 @@ my $tst_type = 0;
my $emacs = 0;
my $terse = 0;
my $file = 0;
+my $file_force = 0;
my $check = 0;
my $summary = 1;
my $mailback = 0;
@@ -34,6 +35,7 @@ GetOptions(
'emacs!' => \$emacs,
'terse!' => \$terse,
'file!' => \$file,
+ 'file-force!' => \$file_force,
'subjective!' => \$check,
'strict!' => \$check,
'root=s' => \$root,
@@ -50,12 +52,28 @@ if ($#ARGV < 0) {
print " --no-tree => run without a kernel tree\n";
print " --terse => one line per report\n";
print " --emacs => emacs compile window format\n";
- print " --file => check a source file\n";
+ print " --file => check a source file (deprecated)\n";
+ print " --file-force => check a source file\n";
print " --strict => enable more subjective tests\n";
print " --root => path to the kernel tree root\n";
exit(1);
}
+if ($file) {
+ print <<EOL
+WARNING: Using --file mode. Please do not send patches to linux-kernel
+that change whole existing files if you did not significantly change most
+of the the file for other reasons anyways or just wrote the file newly
+from scratch. Pure code style patches have a significant cost in a
+quickly changing code base like Linux because they cause rejects
+with other changes.
+If you're sure you want to use whole file mode please use --file-force
+EOL
+;
+ exit(1);
+};
+$file = $file_force;
+
if ($terse) {
$emacs = 1;
$quiet++;
next reply other threads:[~2008-01-08 16:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 16:14 Andi Kleen [this message]
2008-01-08 16:50 ` [PATCH] Deprecate checkpatch.pl --file Daniel Walker
2008-01-08 17:53 ` Sam Ravnborg
2008-01-08 18:01 ` Daniel Walker
2008-01-08 18:20 ` Theodore Tso
2008-01-08 18:33 ` Daniel Walker
2008-01-08 19:21 ` Sam Ravnborg
2008-01-08 19:27 ` Andi Kleen
2008-01-08 20:19 ` Daniel Walker
2008-01-08 21:14 ` Theodore Tso
2008-01-08 21:50 ` Daniel Walker
2008-01-08 20:27 ` Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080108161403.GA11632@basil.nowhere.org \
--to=andi@firstfloor.org \
--cc=akpm@osdl.org \
--cc=apw@shadowen.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox