add 'no matching files' analyze result
@@ -22,6 +22,18 @@ func analyzeTextAnalyze(analyzer *troubleshootv1beta1.TextAnalyze, getCollectedF
checkName = analyzer.CollectorName
}
+ if len(collected) == 0 {
+ return []*AnalyzeResult{
+ {
+ Title: checkName,
+ IconKey: "kubernetes_text_analyze",
+ IconURI: "https://troubleshoot.sh/images/analyzer-icons/text-analyze.svg",
+ IsFail: false,
+ Message: "No matching files",
+ },
+ }, nil
+ }
+
results := []*AnalyzeResult{}
if analyzer.RegexPattern != "" {
