summaryrefslogtreecommitdiff
path: root/util/lint
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2015-05-06 11:10:18 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-05-08 21:19:35 +0200
commit59c2c8b07966a06fd742bc79efb960b8a900fbbc (patch)
tree7940f474eab1c77a9c4c28aec82df4d98e71b200 /util/lint
parent023e8294236d3bd7e39b7af0a4929137c30f089d (diff)
checkpatch: fine tune checks
Fine tune the following two checks: - Check for incorrect file permissions This one had a linux path hard coded, so it would choke on some commits unnecessarily. - FILE_PATH_CHANGES seems to not be working correctly. It will choke on added / deleted files even if the MAINTAINERS file is touched. Hence, switch from WARN to CHK (as WARN currently blocks commits as well) Change-Id: I9fccfbd75e94f420de45cf8b58071e3198065cf3 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10123 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/lint')
-rwxr-xr-xutil/lint/checkpatch.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/lint/checkpatch.pl b/util/lint/checkpatch.pl
index 2f1f56cadd..894e5d7685 100755
--- a/util/lint/checkpatch.pl
+++ b/util/lint/checkpatch.pl
@@ -2069,7 +2069,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 !~ m@scripts/@ &&
+ if ($realfile !~ m@util/lint/@ &&
+ $realfile !~ m@util/scripts/@ &&
$realfile !~ /\.(py|pl|awk|sh)$/) {
ERROR("EXECUTE_PERMISSIONS",
"do not set execute permissions for source files\n" . $permhere);
@@ -2194,7 +2195,7 @@ sub process {
($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
(defined($1) || defined($2))))) {
$reported_maintainer_file = 1;
- WARN("FILE_PATH_CHANGES",
+ CHK("FILE_PATH_CHANGES",
"added, moved or deleted file(s), does MAINTAINERS need updating?\n" . $herecurr);
}