updates link display for first party scan results#1695
Conversation
Signed-off-by: rafi <refaei.shikho@hotmail.com>
There was a problem hiding this comment.
Pull request overview
Updates how the DevGuard scanner displays the “code risks” link for first-party scan results by printing it as standalone output rather than as a wrapped table row.
Changes:
- Remove the “Link” row from the results table output.
- Print the code-risks URL after the table render using
fmt.Printf.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| link := text.FgBlue.Sprint(fmt.Sprintf("%s/%s/refs/%s/code-risks/", webUI, assetName, slug.Make(assetVersionName))) | ||
| //wrappedLink := text.WrapText(link, rowLengthLimit) | ||
| fmt.Printf("See all code risks at:\n%s\n", link) |
There was a problem hiding this comment.
rowLengthLimit is meant to keep output within GitLab’s line-length constraints, but the link is now printed outside the table without wrapping, so long URLs can exceed the limit and get truncated in CI logs. Consider wrapping the printed URL (e.g., via text.WrapText or manual splitting) or otherwise ensuring the output respects rowLengthLimit.
| //wrappedLink := text.WrapText(link, rowLengthLimit) | ||
| fmt.Printf("See all code risks at:\n%s\n", link) |
There was a problem hiding this comment.
There’s commented-out code (//wrappedLink := ...) left behind. Please either remove it or re-enable it (if wrapping is still desired) to avoid accumulating dead code and to keep the intent clear.
| //wrappedLink := text.WrapText(link, rowLengthLimit) | |
| fmt.Printf("See all code risks at:\n%s\n", link) | |
| wrappedLink := text.WrapText(link, rowLengthLimit) | |
| fmt.Printf("See all code risks at:\n%s\n", wrappedLink) |
close #1607