mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
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>
This commit is contained in:
parent
a6962d7273
commit
04db4d25d9
@ -1583,7 +1583,8 @@ sub process {
|
||||
# Check for incorrect file permissions
|
||||
if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
|
||||
my $permhere = $here . "FILE: $realfile\n";
|
||||
if ($realfile =~ /(Makefile|Kconfig|\.c|\.h|\.S|\.tmpl)$/) {
|
||||
if ($realfile !~ m@scripts/@ &&
|
||||
$realfile !~ /\.(py|pl|awk|sh)$/) {
|
||||
ERROR("EXECUTE_PERMISSIONS",
|
||||
"do not set execute permissions for source files\n" . $permhere);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user