提交 b9ea10d6 编写于 作者: A Andy Whitcroft 提交者: Linus Torvalds

checkpatch: perform indent checks on perl

So that we eat our own dog food ensure the indent checks apply to perl
too.
Signed-off-by: NAndy Whitcroft <apw@shadowen.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 f055663c
...@@ -1266,8 +1266,8 @@ sub process { ...@@ -1266,8 +1266,8 @@ sub process {
WARN("adding a line without newline at end of file\n" . $herecurr); WARN("adding a line without newline at end of file\n" . $herecurr);
} }
# check we are in a valid source file *.[hc] if not then ignore this hunk # check we are in a valid source file C or perl if not then ignore this hunk
next if ($realfile !~ /\.[hc]$/); next if ($realfile !~ /\.(h|c|pl)$/);
# at the beginning of a line any tabs must come first and anything # at the beginning of a line any tabs must come first and anything
# more than 8 must use tabs. # more than 8 must use tabs.
...@@ -1277,6 +1277,9 @@ sub process { ...@@ -1277,6 +1277,9 @@ sub process {
ERROR("code indent should use tabs where possible\n" . $herevet); ERROR("code indent should use tabs where possible\n" . $herevet);
} }
# check we are in a valid C source file if not then ignore this hunk
next if ($realfile !~ /\.(h|c)$/);
# check for RCS/CVS revision markers # check for RCS/CVS revision markers
if ($rawline =~ /^\+.*\$(Revision|Log|Id)(?:\$|)/) { if ($rawline =~ /^\+.*\$(Revision|Log|Id)(?:\$|)/) {
WARN("CVS style keyword markers, these will _not_ be updated\n". $herecurr); WARN("CVS style keyword markers, these will _not_ be updated\n". $herecurr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册