Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
fix(cmd): fail when resource file is not referenced
Browse files Browse the repository at this point in the history
a warning message is not enough, the GH action would succeed and we would miss the problem

Signed-off-by: Xavier Coulon <[email protected]>
  • Loading branch information
xcoulon committed May 30, 2024
1 parent 8cda939 commit 46d43b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/validation/resources.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package validation

import (
"fmt"
"path/filepath"
"strings"

Expand Down Expand Up @@ -85,7 +86,7 @@ entries:
continue entries
}
}
logger.Warn("resource is not referenced", "path", path, "resource", e.Name())
return fmt.Errorf("resource is not referenced: %s", filepath.Join(path, e.Name()))
}
return nil
}

0 comments on commit 46d43b6

Please sign in to comment.