diff options
author | 2018-12-07 14:27:17 -0800 | |
---|---|---|
committer | 2018-12-07 14:29:38 -0800 | |
commit | 651294908f32dca9fc74dc5c67a58829a16ebbc4 (patch) | |
tree | a1b6a7c18831072a9b63252faabf2a098ded36bd | |
parent | f37236df5f0f36137e870fe4b5505f6d4be5f919 (diff) |
Allow the include directive.
* The include directive is ignored for now here.
Bug: 112259977
Test: ./checkowners.py -v -c OWNERS
Change-Id: I671f3643ea88e50aea0957db59c36f10bff3b92d
-rwxr-xr-x | tools/checkowners.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/checkowners.py b/tools/checkowners.py index 8568ccf861..7f03968807 100755 --- a/tools/checkowners.py +++ b/tools/checkowners.py @@ -56,7 +56,8 @@ def main(): glob = '[a-zA-Z0-9_\\.\\-\\*\\?]+' globs = '(%s( *, *%s)*)' % (glob, glob) perfile = 'per-file +' + globs + ' *= *' + directive - pats = '(|%s|%s|%s)$' % (noparent, email, perfile) + include = 'include +([^ :]+ *: *)?[^ ]+' + pats = '(|%s|%s|%s|%s)$' % (noparent, email, perfile, include) patterns = re.compile(pats) address_pattern = re.compile('([^@ ]+@[^ @]+)') perfile_pattern = re.compile('per-file +.*=(.*)') |