Lines Matching +full:key +full:- +full:list +full:- +full:string
4 # SPDX-License-Identifier: Apache-2.0
16 ./get_maintainer.py path --help
60 "-m", "--maintainers",
63 "the top-level repository directory is used, and must exist. "
65 "to the top-level directory.")
68 help="Available commands (each has a separate --help text)")
72 help="List area(s) for paths")
77 help="Path to list areas for")
82 help="List area(s) for commit range")
87 help="Commit range to list areas for (default: HEAD~..)")
91 "list",
92 help="List files in areas")
97 help="Name of area to list files in. If not specified, all "
98 "non-orphaned files are listed (all files that do not appear in "
104 help="List areas and maintainers")
109 help="List all areas maintained by maintainer.")
115 help="List orphaned files (files that do not appear in any area)")
127 "-a",
128 "--count-areas",
132 "-c",
133 "--count-collaborators",
137 "-n",
138 "--count-maintainers",
142 "-o",
143 "--count-unmaintained",
175 the top-level directory of the Git repository is used, and must
182 self._toplevel = pathlib.Path(_git("rev-parse", "--show-toplevel"))
199 # files-regex
202 area_dict.get("files-regex"))
204 # Like area._match_fn(path), but for files-exclude and
205 # files-regex-exclude
207 _get_match_fn(area_dict.get("files-exclude"),
208 area_dict.get("files-regex-exclude"))
214 Returns a list of Area instances for the areas that contain 'path',
241 # Final '--' is to make sure 'commits' is interpreted as a commit range
243 for path in _git("diff", "--name-only", commits, "--").splitlines():
251 # Command-line subcommands
322 # 'list' subcommand implementation
325 # List all files that appear in some area
332 # List all files that appear in the given area
363 The status of the area, as a string. None if the area has no 'status'
364 key. See MAINTAINERS.yml.
367 List of maintainers. Empty if the area has no 'maintainers' key.
370 List of collaborators. Empty if the area has no 'collaborators' key.
373 List of people to inform on pull requests. Empty if the area has no
374 'inform' key.
377 List of GitHub labels for the area. Empty if the area has no 'labels'
378 key.
381 Text from 'description' key, or None if the area has no 'description'
382 key
396 for area in sorted(areas, key=operator.attrgetter("name")):
448 # return search(). (?:) is a non-capturing group.
464 with open(path, encoding="utf-8") as f:
487 "files-exclude", "files-regex", "files-regex-exclude",
498 for key in area_dict:
499 if key not in ok_keys:
500 ferr("unknown key '{}' in area '{}'"
501 .format(key, area_name))
505 ferr("bad 'status' key on area '{}', should be one of {}"
508 if not area_dict.keys() & {"files", "files-regex"}:
509 ferr("either 'files' or 'files-regex' (or both) must be specified "
516 "files-regex", "labels", "tags", "tests":
519 if not (isinstance(lst, list) and
521 ferr("malformed '{}' value for area '{}' -- should "
522 "be a list of strings".format(list_name, area_name))
524 for files_key in "files", "files-exclude":
528 # e.g. to only check non-globbing filenames. The tuple() is
543 for files_regex_key in "files-regex", "files-regex-exclude":
555 ferr("malformed 'description' value for area '{}' -- should be a "
556 "string".format(area_name))
580 git_cmd_s, stdout.decode("utf-8"), stderr.decode("utf-8")))
582 return stdout.decode("utf-8").rstrip()
586 cmd = ["ls-files"]
607 "Exception raised for MAINTAINERS.yml-related errors"
611 "Exception raised for Git-related errors"