From: Andy Whitcroft Date: Thu, 16 Oct 2008 05:02:24 +0000 (-0700) Subject: checkpatch: perform indent checks on perl X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b9ea10d691ecb616ce9e4d7a51400dfd93f52b2d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 36825c3d7d79..ba677c17c334 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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. @@ -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);