Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/29602
Change subject: util/scrips/maintainers.go: Allow file to appear in multiple components ......................................................................
util/scrips/maintainers.go: Allow file to appear in multiple components
Without this change, the tool only reports the first hit. We want to see all of them.
Change-Id: Ib59b13c50b61c48e3cb200bf57e28c9453590819 Signed-off-by: Patrick Georgi pgeorgi@google.com --- M util/scripts/maintainers.go 1 file changed, 10 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/29602/1
diff --git a/util/scripts/maintainers.go b/util/scripts/maintainers.go index 1b8b645..352d0a1 100644 --- a/util/scripts/maintainers.go +++ b/util/scripts/maintainers.go @@ -206,6 +206,7 @@ }
func find_maintainer(fname string) { + success := false for _, subsystem := range subsystems { matched, err := match_file(fname, subsystem.file) if err != nil { @@ -213,16 +214,19 @@ return } if matched && subsystem.name != "THE REST" { + success = true fmt.Println(fname, "is in subsystem", subsystem.name) fmt.Println("Maintainers: ", subsystem.maintainer) - return } } - fmt.Println(fname, "has no subsystem defined in MAINTAINERS") + if !success { + fmt.Println(fname, "has no subsystem defined in MAINTAINERS") + } }
func find_unmaintained(fname string) { + success := false for _, subsystem := range subsystems { matched, err := match_file(fname, subsystem.file) if err != nil { @@ -230,12 +234,14 @@ return } if matched && subsystem.name != "THE REST" { + success = true fmt.Println(fname, "is in subsystem", subsystem.name) - return } } - fmt.Println(fname, "has no subsystem defined in MAINTAINERS") + if !success { + fmt.Println(fname, "has no subsystem defined in MAINTAINERS") + } }
func main() {