Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164531
b: refs/heads/master
c: 77f5b10
h: refs/heads/master
i:
  164529: d8f3792
  164527: dccd786
v: v3
  • Loading branch information
Hannes Eder authored and Linus Torvalds committed Sep 22, 2009
1 parent 859e9d0 commit 128fa4d
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 30dad6ebecffebddf6b9947d11e31377fa900ff3
refs/heads/master: 77f5b10a82bbd832c99ec4b120d5645342a5b140
55 changes: 42 additions & 13 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,49 @@
my $summary_file = 0;
my $root;
my %debug;
my $help = 0;

sub help {
my ($exitcode) = @_;

print << "EOM";
Usage: $P [OPTION]... [FILE]...
Version: $V
Options:
-q, --quiet quiet
--no-tree run without a kernel tree
--no-signoff do not check for 'Signed-off-by' line
--patch treat FILE as patchfile (default)
--emacs emacs compile window format
--terse one line per report
-f, --file treat FILE as regular source file
--subjective, --strict enable more subjective tests
--root=PATH PATH to the kernel tree root
--no-summary suppress the per-file summary
--mailback only produce a report in case of warnings/errors
--summary-file include the filename in summary
--debug KEY=[0|1] turn on/off debugging of KEY, where KEY is one of
'values', 'possible', 'type', and 'attr' (default
is all off)
--test-only=WORD report only warnings/errors containing WORD
literally
-h, --help, --version display this help and exit
When FILE is - read standard input.
EOM

exit($exitcode);
}

GetOptions(
'q|quiet+' => \$quiet,
'tree!' => \$tree,
'signoff!' => \$chk_signoff,
'patch!' => \$chk_patch,
'emacs!' => \$emacs,
'terse!' => \$terse,
'file!' => \$file,
'f|file!' => \$file,
'subjective!' => \$check,
'strict!' => \$check,
'root=s' => \$root,
Expand All @@ -45,22 +80,16 @@

'debug=s' => \%debug,
'test-only=s' => \$tst_only,
) or exit;
'h|help' => \$help,
'version' => \$help
) or help(1);

help(0) if ($help);

my $exit = 0;

if ($#ARGV < 0) {
print "usage: $P [options] patchfile\n";
print "version: $V\n";
print "options: -q => quiet\n";
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 " --strict => enable more subjective tests\n";
print " --root => path to the kernel tree root\n";
print " --no-summary => suppress the per-file summary\n";
print " --summary-file => include the filename in summary\n";
print "$P: no input files\n";
exit(1);
}

Expand Down

0 comments on commit 128fa4d

Please sign in to comment.