History

checkpatch: perform indent checks on perl

So that we eat our own dog food ensure the indent checks apply to perl too.

Andy Whitcroft committed 18 years ago

Commit b9ea10d1 parent f0556631 file · +5 −2Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+5−2
@@ -1266,8 +1266,8 @@ sub process { · 1265 unmodified lines
12661266 WARN("adding a line without newline at end of file\n" . $herecurr);
12671267 }
12681268
1269−# check we are in a valid source file *.[hc] if not then ignore this hunk
1270− next if ($realfile !~ /\.[hc]$/);
1269+# check we are in a valid source file C or perl if not then ignore this hunk
1270+ next if ($realfile !~ /\.(h|c|pl)$/);
12711271
12721272 # at the beginning of a line any tabs must come first and anything
12731273 # more than 8 must use tabs.
@@ -1277,6 +1277,9 @@ sub process { · 3 unmodified lines
12771277 ERROR("code indent should use tabs where possible\n" . $herevet);
12781278 }
12791279
1280+# check we are in a valid C source file if not then ignore this hunk
1281+ next if ($realfile !~ /\.(h|c)$/);
1282+
12801283 # check for RCS/CVS revision markers
12811284 if ($rawline =~ /^\+.*\$(Revision|Log|Id)(?:\$|)/) {
12821285 WARN("CVS style keyword markers, these will _not_ be updated\n". $herecurr);