Unverified Commit bbb078fe authored by TzlilSwimmer123's avatar TzlilSwimmer123 Committed by GitHub
Browse files

feat: return filename as title if relative path is empty (#666)

Co-authored-by: default avatarteselil <tzlil@datree.com>
parent ed6aaafc
Showing with 6 additions and 1 deletion
+6 -1
......@@ -279,10 +279,15 @@ func parseToPrinterWarnings(results *EvaluationResults, invalidYamlFiles []*extr
}
}
title := filename
relativePath, _ := filepath.Rel(pwd, filename)
if relativePath != "" {
title = relativePath
}
warnings = append(warnings, printer.Warning{
Title: relativePath,
Title: title,
FailedRules: failedRules,
SkippedRules: skippedRules,
InvalidYamlInfo: printer.InvalidYamlInfo{},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment