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> Reviewed-on: https://review.coreboot.org/29602 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
This commit is contained in:
parent
cca1f371d2
commit
2e5d6a8153
|
@ -177,6 +177,8 @@ func match_file(fname string, files []string) (bool, error) {
|
|||
}
|
||||
|
||||
func find_maintainer(fname string) {
|
||||
var success bool
|
||||
|
||||
for _, subsystem := range subsystems {
|
||||
matched, err := match_file(fname, subsystem.file)
|
||||
if err != nil {
|
||||
|
@ -184,16 +186,20 @@ func find_maintainer(fname string) {
|
|||
return
|
||||
}
|
||||
if matched && subsystem.name != "THE REST" {
|
||||
success = true
|
||||
fmt.Println(fname, "is in subsystem",
|
||||
subsystem.name)
|
||||
fmt.Println("Maintainers: ", subsystem.maintainer)
|
||||
return
|
||||
}
|
||||
}
|
||||
if !success {
|
||||
fmt.Println(fname, "has no subsystem defined in MAINTAINERS")
|
||||
}
|
||||
}
|
||||
|
||||
func find_unmaintained(fname string) {
|
||||
var success bool
|
||||
|
||||
for _, subsystem := range subsystems {
|
||||
matched, err := match_file(fname, subsystem.file)
|
||||
if err != nil {
|
||||
|
@ -201,13 +207,15 @@ func find_unmaintained(fname string) {
|
|||
return
|
||||
}
|
||||
if matched && subsystem.name != "THE REST" {
|
||||
success = true
|
||||
fmt.Println(fname, "is in subsystem",
|
||||
subsystem.name)
|
||||
return
|
||||
}
|
||||
}
|
||||
if !success {
|
||||
fmt.Println(fname, "has no subsystem defined in MAINTAINERS")
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
var files []string
|
||||
|
|
Loading…
Reference in New Issue