Re: [PATCH] scripts/checkpatch.pl: Warn on non-executable files createdwith non 100644 file permissions

From: Michal Marek
Date: Mon Oct 11 2010 - 10:39:27 EST


On 7.10.2010 08:54, Wolfram Sang wrote:
> On Wed, Oct 06, 2010 at 04:31:31PM -0700, Joe Perches wrote:
>> + 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);
>> + }
>
> What about checking for no filename extension, too, and changing the message to
> something like "use proper file permission or proper extension"?

That would result in too many false positives, I'm afraid. What about
checking for files with a shebang?

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/