Skip to content

Commit

Permalink
internal/scan: remove redundant newline for package and module mode
Browse files Browse the repository at this point in the history
Change-Id: If35e3951c20ad3c98f8a940172933acce665e7bd
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/551377
LUCI-TryBot-Result: Go LUCI <[email protected]>
Run-TryBot: Zvonimir Pavlinovic <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Maceo Thompson <[email protected]>
  • Loading branch information
zpavlinovic committed Dec 19, 2023
1 parent 9be1a0d commit ae31108
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ Vulnerability #2: GO-2021-0113
Found in: golang.org/x/[email protected]
Fixed in: golang.org/x/[email protected]


Share feedback at https://go.dev/s/govulncheck-feedback.
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ Vulnerability #2: GO-2021-0113
Found in: golang.org/x/[email protected]
Fixed in: golang.org/x/[email protected]


Share feedback at https://go.dev/s/govulncheck-feedback.
1 change: 0 additions & 1 deletion internal/scan/testdata/module-vuln.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ Vulnerability #1: GO-0000-0001
Fixed in: golang.org/[email protected]
Platforms: amd


Share feedback at https://go.dev/s/govulncheck-feedback.
1 change: 0 additions & 1 deletion internal/scan/testdata/multi-stack-modlevel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ Vulnerability #2: GO-0000-0001
Fixed in: golang.org/[email protected]
Platforms: amd


Share feedback at https://go.dev/s/govulncheck-feedback.
1 change: 0 additions & 1 deletion internal/scan/testdata/package-vuln.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ Vulnerability #1: GO-0000-0001
Fixed in: golang.org/[email protected]
Platforms: amd


Share feedback at https://go.dev/s/govulncheck-feedback.
6 changes: 3 additions & 3 deletions internal/scan/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (h *TextHandler) Flush() error {
fixupFindings(h.osvs, h.findings)
h.byVulnerability(h.findings)
h.summary(h.findings)
h.print("\nShare feedback at https://go.dev/s/govulncheck-feedback.\n")
h.print("Share feedback at https://go.dev/s/govulncheck-feedback.\n")
if h.err != nil {
return h.err
}
Expand Down Expand Up @@ -298,7 +298,7 @@ func (h *TextHandler) traces(traces []*findingSummary) {
func (h *TextHandler) summary(findings []*findingSummary) {
counters := counters(findings)
if counters.VulnerabilitiesCalled == 0 {
h.print(choose(h.scanLevel.WantSymbols(), "No vulnerabilities found.\n", ""))
h.print(choose(h.scanLevel.WantSymbols(), "No vulnerabilities found.\n\n", ""))
return
}
h.print(`Your code is affected by `)
Expand All @@ -316,7 +316,7 @@ func (h *TextHandler) summary(findings []*findingSummary) {
}
h.print(` the Go standard library`)
}
h.print(".\n")
h.print(".\n\n")
}

func (h *TextHandler) style(style style, values ...any) {
Expand Down

0 comments on commit ae31108

Please sign in to comment.