Skip to content

Commit

Permalink
checkpatch: perform indent checks on perl
Browse files Browse the repository at this point in the history
So that we eat our own dog food ensure the indent checks apply to perl
too.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed Oct 16, 2008
1 parent f055663 commit b9ea10d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1266,8 +1266,8 @@ sub process {
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
next if ($realfile !~ /\.[hc]$/);
# check we are in a valid source file C or perl if not then ignore this hunk
next if ($realfile !~ /\.(h|c|pl)$/);

# at the beginning of a line any tabs must come first and anything
# more than 8 must use tabs.
Expand All @@ -1277,6 +1277,9 @@ sub process {
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
if ($rawline =~ /^\+.*\$(Revision|Log|Id)(?:\$|)/) {
WARN("CVS style keyword markers, these will _not_ be updated\n". $herecurr);
Expand Down

0 comments on commit b9ea10d

Please sign in to comment.