pre-upload: Disable check for MAINTAINERS file in checkpatch
We do not require updates to the MAINTAINERS file, so suppress the
checkpatch.pl warning for it in cases where files are added or moved.
Do this globally for all checkpatch instances (otherwise, we would need
to update all the affected PRESUBMIT.cfg's in all repos.)
TEST=Cherry-picked the patch in https://chromium-review.googlesource.com/#/c/300642/
Changed its change-id and tried to repo upload it again.
Before this commit, I got the warning:
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
With the updated script, I got no warnings and repo upload succeeded.
Signed-off-by: Filipe Brandenburger <email@example.com>
Reviewed-by: Olof Johansson <firstname.lastname@example.org>
Reviewed-by: Mike Frysinger <email@example.com>
diff --git a/pre-upload.py b/pre-upload.py
index 40bc5c7..849dadc 100755
@@ -1094,6 +1094,10 @@
# The --ignore option must be present and include 'MISSING_SIGN_OFF' in
# this case.
+ # Always ignore the check for the MAINTAINERS file. We do not track that
+ # information on that file in our source trees, so let's suppress the
+ # warning.
cmd = ['%s/checkpatch.pl' % hooks_dir] + options + ['-']
cmd_result = cros_build_lib.RunCommand(cmd=cmd,