Count failed loads as danger in hidden issues

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 20:14:47 +02:00
co-authored by Claude Sonnet 5.5
parent af6d03a5b1
commit e5fdc875af
3 changed files with 17 additions and 1 deletions
+6 -1
View File
@@ -61,9 +61,14 @@ func (s *Status) Issues() []Issue {
}
// HiddenIssues counts the issues of all loaded descendants and returns the
// most severe level among them.
// most severe level among them. A descendant whose load failed counts as one
// danger, since its state is unknown.
func (m *Submodule) HiddenIssues() (count int, worst Level) {
Walk(m.Children, func(c *Submodule) {
if c.Status == nil && c.Err != nil {
count++
worst = max(worst, LevelDanger)
}
for _, is := range c.Status.Issues() {
count++
worst = max(worst, is.Level)