diff options
author | Joe Perches <joe@perches.com> | 2013-04-29 19:18:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 21:28:20 -0400 |
commit | 04db4d25d9eaa58140520f976994d1a601129c00 (patch) | |
tree | ef0f2c8c04f8deba8fd9ea9b81d00edbda3f575e /scripts/checkpatch.pl | |
parent | a6962d7273d8f89c136fe9ea3d61d7f47adcd823 (diff) |
checkpatch: complain about executable files
Complain about files with an executable bit set that are not in a scripts/
directory and are not type .pl, .py, .awk, or .sh
Based on an initial patch from Stephen.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b8b03aa52beb..9cdd147c1335 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -1583,7 +1583,8 @@ sub process { | |||
1583 | # Check for incorrect file permissions | 1583 | # Check for incorrect file permissions |
1584 | if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) { | 1584 | if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) { |
1585 | my $permhere = $here . "FILE: $realfile\n"; | 1585 | my $permhere = $here . "FILE: $realfile\n"; |
1586 | if ($realfile =~ /(Makefile|Kconfig|\.c|\.h|\.S|\.tmpl)$/) { | 1586 | if ($realfile !~ m@scripts/@ && |
1587 | $realfile !~ /\.(py|pl|awk|sh)$/) { | ||
1587 | ERROR("EXECUTE_PERMISSIONS", | 1588 | ERROR("EXECUTE_PERMISSIONS", |
1588 | "do not set execute permissions for source files\n" . $permhere); | 1589 | "do not set execute permissions for source files\n" . $permhere); |
1589 | } | 1590 | } |