public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts/checkpatch.pl: Warn on non-executable files created with non 100644 file permissions
@ 2010-10-06 23:31 Joe Perches
  2010-10-07  6:54 ` Wolfram Sang
  2010-10-07 10:48 ` Rabin Vincent
  0 siblings, 2 replies; 4+ messages in thread
From: Joe Perches @ 2010-10-06 23:31 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: Andrew Morton, LKML

Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/checkpatch.pl |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 2039acd..6f8a1d4 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1346,6 +1346,14 @@ sub process {
 			}
 		}
 
+		if ($rawline =~ /^ create mode (\d+) ([\w\.\/\-]+)$/) {
+			my $mode = $1;
+			my $file = $2;
+			if ($mode ne "100644" && !($file =~ /\.(sh|pl|py|awk)$/)) {
+				WARN("FILE '$file' should probably use file permission 100644 not $mode\n" . $herecurr);
+			}
+		}
+
 # Check for wrappage within a valid hunk of the file
 		if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
 			ERROR("patch seems to be corrupt (line wrapped?)\n" .



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-11 14:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-06 23:31 [PATCH] scripts/checkpatch.pl: Warn on non-executable files created with non 100644 file permissions Joe Perches
2010-10-07  6:54 ` Wolfram Sang
2010-10-11 14:39   ` Michal Marek
2010-10-07 10:48 ` Rabin Vincent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox