aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-hung Hsieh <chh@google.com>2019-03-13 20:47:10 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-03-13 20:47:10 +0000
commitcda227eeaf4788e1932c3146811013995de7b605 (patch)
tree89aad26c49542e0a8f12b3d706038efdbaeda8e9
parenta6d9bd539a765702e5c9d2860228033c6dd471b4 (diff)
parentcc477297199786e6c49def016355daa2953742b1 (diff)
downloadbuild-android-o-mr1-iot-release-1.0.10.tar.gz
Merge "Accept the "file:(project:)?filePath" directive."android-o-mr1-iot-release-1.0.10
-rwxr-xr-xtools/checkowners.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/checkowners.py b/tools/checkowners.py
index 7f03968807..d6853d8e87 100755
--- a/tools/checkowners.py
+++ b/tools/checkowners.py
@@ -52,12 +52,13 @@ def main():
noparent = 'set +noparent'
email = '([^@ ]+@[^ @]+|\\*)'
emails = '(%s( *, *%s)*)' % (email, email)
- directive = '(%s|%s)' % (emails, noparent)
+ file_directive = 'file: *([^ :]+ *: *)?[^ ]+'
+ directive = '(%s|%s|%s)' % (emails, noparent, file_directive)
glob = '[a-zA-Z0-9_\\.\\-\\*\\?]+'
globs = '(%s( *, *%s)*)' % (glob, glob)
perfile = 'per-file +' + globs + ' *= *' + directive
include = 'include +([^ :]+ *: *)?[^ ]+'
- pats = '(|%s|%s|%s|%s)$' % (noparent, email, perfile, include)
+ pats = '(|%s|%s|%s|%s|%s)$' % (noparent, email, perfile, include, file_directive)
patterns = re.compile(pats)
address_pattern = re.compile('([^@ ]+@[^ @]+)')
perfile_pattern = re.compile('per-file +.*=(.*)')