Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04db4d25 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

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: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a6962d72
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);
			}