coreboot-kgpe-d16/util/scripts
Michael Niewöhner a0c7f34302 maintainers.go: Work around common mistake in MAINTAINERS
Gerrit is able to add reviewers based on entries in the `MAINTAINERS`
file. For inclusion and exclusion matches either paths or regular
expressions can be used. The syntax is described in the header of the
file.

When matching a path, there are two sensible possibilities:
  - `path/to/file`  matches a file.
  - `path/to/dir/`  matches a folder including its contents recursively.
  - `path/to/dir/*` matches all files in that folder, without recursing
                    into its subfolders.

The trailing slash in the second example is essential. Without it, only
the directory entry itself matches when, for example, the folder gets
deleted, renamed or its permissions get modified. Reviewers in the list
won't get added to changes of any files or directories below that path.

However, from time to time entries get added without this trailing
slash. Thus, implement a workaround in `maintainers.go` to check, if a
path entry is actually a directory. In such case a trailing slash gets
appended, so that the contents will match, too.

Example: `path/to/dir` will become `path/to/dir/`

Tests:
1. output before and after does not differ
2. manual test of resulting regex when running `maintainers.go`

Change-Id: Ic712aacb0c5c50380fa9beeccf5161501f1cd8ea
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52276
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-04-14 12:18:58 +00:00
..
config
cross-repo-cherrypick util: Update all shebangs to use /usr/bin/env 2021-01-25 08:57:40 +00:00
decode_spd.sh util: Update all shebangs to use /usr/bin/env 2021-01-25 08:57:40 +00:00
description.md
dts-to-fmd.sh
find-unused-kconfig-symbols.sh util: Update all shebangs to use /usr/bin/env 2021-01-25 08:57:40 +00:00
gerrit-rebase
get_maintainer.pl
maintainers.go maintainers.go: Work around common mistake in MAINTAINERS 2021-04-14 12:18:58 +00:00
no-fsf-addresses.sh util: Update all shebangs to use /usr/bin/env 2021-01-25 08:57:40 +00:00
parse-maintainers.pl
prepare-commit-msg.clang-format treewide: use /usr/bin/env where appropriate 2018-11-17 07:32:03 +00:00
ucode_h_to_bin.sh
update_submodules