* [PATCH] checkpatch: add filename in the summary
@ 2008-01-14 22:23 Paolo Ciarrocchi
2008-01-15 18:30 ` Cyrill Gorcunov
2008-01-22 13:20 ` Paolo Ciarrocchi
0 siblings, 2 replies; 6+ messages in thread
From: Paolo Ciarrocchi @ 2008-01-14 22:23 UTC (permalink / raw)
To: apw, Linux Kernel
Add a filename option (default to 0)
in order to get the following summary output:
./scripts/checkpatch.pl --filename --file ./arch/sparc/kernel/apc.c
...
...
...
./arch/sparc/kernel/apc.c --> total: 18 errors, 3 warnings, 186 lines checked
---
Andy,
I wonder why checkpatch doesn't show all the command line options.
At the moment, it only prints:
options: -q => quiet
--no-tree => run without a kernel tree
--terse => one line per report
--emacs => emacs compile window format
--file => check a source file
--strict => enable more subjective tests
--root => path to the kernel tree root
but I see a lot more options:
q|quiet
tree
signoff
patch
test-type
emacs
terse
file
subjective
strict
root=s
summary
mailback
scripts/checkpatch.pl | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 579f50f..1762b73 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -24,6 +24,7 @@ my $file = 0;
my $check = 0;
my $summary = 1;
my $mailback = 0;
+my $patchfilename= 0;
my $root;
GetOptions(
'q|quiet+' => \$quiet,
@@ -39,6 +40,7 @@ GetOptions(
'root=s' => \$root,
'summary!' => \$summary,
'mailback!' => \$mailback,
+ 'filename' => \$patchfilename,
) or exit;
my $exit = 0;
@@ -1579,12 +1581,18 @@ sub process {
}
print report_dump();
- if ($summary) {
+ if ($summary == 1 && $patchfilename == 0) {
print "total: $cnt_error errors, $cnt_warn warnings, " .
(($check)? "$cnt_chk checks, " : "") .
"$cnt_lines lines checked\n";
print "\n" if ($quiet == 0);
}
+ if ($summary == 1 && $patchfilename == 1) {
+ print "$filename --> total: $cnt_error errors, $cnt_warn warnings, " .
+ (($check)? "$cnt_chk checks, " : "") .
+ "$cnt_lines lines checked\n";
+ print "\n" if ($quiet == 0);
+ }
if ($clean == 1 && $quiet == 0) {
print "Your patch has no obvious style problems and is ready for submission.\n"
--
1.5.4.rc3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] checkpatch: add filename in the summary
2008-01-14 22:23 [PATCH] checkpatch: add filename in the summary Paolo Ciarrocchi
@ 2008-01-15 18:30 ` Cyrill Gorcunov
2008-01-15 18:43 ` Paolo Ciarrocchi
2008-01-22 13:20 ` Paolo Ciarrocchi
1 sibling, 1 reply; 6+ messages in thread
From: Cyrill Gorcunov @ 2008-01-15 18:30 UTC (permalink / raw)
To: Paolo Ciarrocchi; +Cc: apw, Linux Kernel
[Paolo Ciarrocchi - Mon, Jan 14, 2008 at 11:23:39PM +0100]
| Add a filename option (default to 0)
| in order to get the following summary output:
| ./scripts/checkpatch.pl --filename --file ./arch/sparc/kernel/apc.c
| ...
| ...
| ...
| ./arch/sparc/kernel/apc.c --> total: 18 errors, 3 warnings, 186 lines checked
| ---
|
| Andy,
| I wonder why checkpatch doesn't show all the command line options.
| At the moment, it only prints:
| options: -q => quiet
| --no-tree => run without a kernel tree
| --terse => one line per report
| --emacs => emacs compile window format
| --file => check a source file
| --strict => enable more subjective tests
| --root => path to the kernel tree root
|
| but I see a lot more options:
| q|quiet
| tree
| signoff
| patch
| test-type
| emacs
| terse
| file
| subjective
| strict
| root=s
| summary
| mailback
|
|
|
Hi Paolo,
the options you're complaining about (in most) are enabled by default so
there is no reason to 'turn them on' explicitly /methink/.
- Cyrill -
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] checkpatch: add filename in the summary
2008-01-15 18:30 ` Cyrill Gorcunov
@ 2008-01-15 18:43 ` Paolo Ciarrocchi
2008-01-15 18:49 ` Cyrill Gorcunov
0 siblings, 1 reply; 6+ messages in thread
From: Paolo Ciarrocchi @ 2008-01-15 18:43 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: apw, Linux Kernel
On 1/15/08, Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> [Paolo Ciarrocchi - Mon, Jan 14, 2008 at 11:23:39PM +0100]
> Hi Paolo,
>
> the options you're complaining about (in most) are enabled by default so
> there is no reason to 'turn them on' explicitly /methink/.
>
I was looking for more information, i didn't want to complain :-)
That said, i still think that document how to disable/enable all the
options might be useful.
Ciao,
--
Paolo
http://paolo.ciarrocchi.googlepages.com/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] checkpatch: add filename in the summary
2008-01-15 18:43 ` Paolo Ciarrocchi
@ 2008-01-15 18:49 ` Cyrill Gorcunov
0 siblings, 0 replies; 6+ messages in thread
From: Cyrill Gorcunov @ 2008-01-15 18:49 UTC (permalink / raw)
To: Paolo Ciarrocchi; +Cc: apw, Linux Kernel
[Paolo Ciarrocchi - Tue, Jan 15, 2008 at 10:13:43PM +0330]
| On 1/15/08, Cyrill Gorcunov <gorcunov@gmail.com> wrote:
| > [Paolo Ciarrocchi - Mon, Jan 14, 2008 at 11:23:39PM +0100]
|
| > Hi Paolo,
| >
| > the options you're complaining about (in most) are enabled by default so
| > there is no reason to 'turn them on' explicitly /methink/.
| >
|
|
| I was looking for more information, i didn't want to complain :-)
oh, typo, s/complain/worry/ ;)
| That said, i still think that document how to disable/enable all the
| options might be useful.
|
| Ciao,
| --
| Paolo
| http://paolo.ciarrocchi.googlepages.com/
|
- Cyrill -
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] checkpatch: add filename in the summary
2008-01-14 22:23 [PATCH] checkpatch: add filename in the summary Paolo Ciarrocchi
2008-01-15 18:30 ` Cyrill Gorcunov
@ 2008-01-22 13:20 ` Paolo Ciarrocchi
2008-01-28 14:38 ` Andy Whitcroft
1 sibling, 1 reply; 6+ messages in thread
From: Paolo Ciarrocchi @ 2008-01-22 13:20 UTC (permalink / raw)
To: apw, Linux Kernel
On Jan 14, 2008 11:23 PM, Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> wrote:
> Add a filename option (default to 0)
> in order to get the following summary output:
> ./scripts/checkpatch.pl --filename --file ./arch/sparc/kernel/apc.c
> ...
> ...
> ...
> ./arch/sparc/kernel/apc.c --> total: 18 errors, 3 warnings, 186 lines checked
> ---
>
> Andy,
> I wonder why checkpatch doesn't show all the command line options.
> At the moment, it only prints:
> options: -q => quiet
> --no-tree => run without a kernel tree
> --terse => one line per report
> --emacs => emacs compile window format
> --file => check a source file
> --strict => enable more subjective tests
> --root => path to the kernel tree root
>
> but I see a lot more options:
> q|quiet
> tree
> signoff
> patch
> test-type
> emacs
> terse
> file
> subjective
> strict
> root=s
> summary
> mailback
>
[patch snipped]
Hi Andy,
do you plan to document all the command line options that checkpatch
is currently accepting?
Thanks.
Ciao,
--
Paolo
http://paolo.ciarrocchi.googlepages.com/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] checkpatch: add filename in the summary
2008-01-22 13:20 ` Paolo Ciarrocchi
@ 2008-01-28 14:38 ` Andy Whitcroft
0 siblings, 0 replies; 6+ messages in thread
From: Andy Whitcroft @ 2008-01-28 14:38 UTC (permalink / raw)
To: Paolo Ciarrocchi; +Cc: Linux Kernel
On Tue, Jan 22, 2008 at 02:20:48PM +0100, Paolo Ciarrocchi wrote:
> On Jan 14, 2008 11:23 PM, Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> wrote:
> > Add a filename option (default to 0)
> > in order to get the following summary output:
> > ./scripts/checkpatch.pl --filename --file ./arch/sparc/kernel/apc.c
> > ...
> > ...
> > ...
> > ./arch/sparc/kernel/apc.c --> total: 18 errors, 3 warnings, 186 lines checked
Ok, I've applied a heavily modified version of this to match the current
code. The option is now --summary-file to prevent confusion between it
and the --file option.
> Hi Andy,
> do you plan to document all the command line options that checkpatch
> is currently accepting?
Most of the undocumented options are either used in testing or are for
uncommon usage. Some work does need doing on the usage tho.
-apw
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-01-28 14:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-14 22:23 [PATCH] checkpatch: add filename in the summary Paolo Ciarrocchi
2008-01-15 18:30 ` Cyrill Gorcunov
2008-01-15 18:43 ` Paolo Ciarrocchi
2008-01-15 18:49 ` Cyrill Gorcunov
2008-01-22 13:20 ` Paolo Ciarrocchi
2008-01-28 14:38 ` Andy Whitcroft
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).