|
@@ -1315,7 +1315,11 @@ sub process {
|
|
$here = "#$realline: " if ($file);
|
|
$here = "#$realline: " if ($file);
|
|
|
|
|
|
# extract the filename as it passes
|
|
# extract the filename as it passes
|
|
- if ($line=~/^\+\+\+\s+(\S+)/) {
|
|
|
|
|
|
+ if ($line =~ /^diff --git.*?(\S+)$/) {
|
|
|
|
+ $realfile = $1;
|
|
|
|
+ $realfile =~ s@^([^/]*)/@@;
|
|
|
|
+
|
|
|
|
+ } elsif ($line =~ /^\+\+\+\s+(\S+)/) {
|
|
$realfile = $1;
|
|
$realfile = $1;
|
|
$realfile =~ s@^([^/]*)/@@;
|
|
$realfile =~ s@^([^/]*)/@@;
|
|
|
|
|
|
@@ -1339,6 +1343,14 @@ sub process {
|
|
|
|
|
|
$cnt_lines++ if ($realcnt != 0);
|
|
$cnt_lines++ if ($realcnt != 0);
|
|
|
|
|
|
|
|
+# 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)$/) {
|
|
|
|
+ ERROR("do not set execute permissions for source files\n" . $permhere);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
#check the patch for a signoff:
|
|
#check the patch for a signoff:
|
|
if ($line =~ /^\s*signed-off-by:/i) {
|
|
if ($line =~ /^\s*signed-off-by:/i) {
|
|
# This is a signoff, if ugly, so do not double report.
|
|
# This is a signoff, if ugly, so do not double report.
|