internal/scan: fix double line spacing

Change-Id: I67d096196a4e54a12b4213c8011406a9ff65759e
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/508921
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Run-TryBot: Ian Cottrell <iancottrell@google.com>
Auto-Submit: Ian Cottrell <iancottrell@google.com>
diff --git a/cmd/govulncheck/testdata/source_informational_text.ct b/cmd/govulncheck/testdata/source_informational_text.ct
index 3becfc5..a8d1047 100644
--- a/cmd/govulncheck/testdata/source_informational_text.ct
+++ b/cmd/govulncheck/testdata/source_informational_text.ct
@@ -5,7 +5,6 @@
 
 Scanning your code and P packages across M dependent modules for known vulnerabilities...
 
-
 === Informational ===
 
 Found 1 vulnerability in packages that you import, but there are no call
diff --git a/internal/scan/testdata/no-vulns.txt b/internal/scan/testdata/no-vulns.txt
index 3ea6a00..dd753c1 100644
--- a/internal/scan/testdata/no-vulns.txt
+++ b/internal/scan/testdata/no-vulns.txt
@@ -1,6 +1,5 @@
 Using govulncheck with vulnerability data from .
 
-
 === Informational ===
 
 Found 1 vulnerability in packages that you import, but there are no call
diff --git a/internal/scan/testdata/platform-all.txt b/internal/scan/testdata/platform-all.txt
index e3b5ce0..1c456fe 100644
--- a/internal/scan/testdata/platform-all.txt
+++ b/internal/scan/testdata/platform-all.txt
@@ -1,6 +1,5 @@
 Using govulncheck with vulnerability data from .
 
-
 === Informational ===
 
 Found 1 vulnerability in packages that you import, but there are no call
diff --git a/internal/scan/testdata/platform-one-arch-only.txt b/internal/scan/testdata/platform-one-arch-only.txt
index 55f4184..2884b45 100644
--- a/internal/scan/testdata/platform-one-arch-only.txt
+++ b/internal/scan/testdata/platform-one-arch-only.txt
@@ -1,6 +1,5 @@
 Using govulncheck with vulnerability data from .
 
-
 === Informational ===
 
 Found 1 vulnerability in packages that you import, but there are no call
diff --git a/internal/scan/testdata/platform-one-import.txt b/internal/scan/testdata/platform-one-import.txt
index acd1903..80d3cc8 100644
--- a/internal/scan/testdata/platform-one-import.txt
+++ b/internal/scan/testdata/platform-one-import.txt
@@ -1,6 +1,5 @@
 Using govulncheck with vulnerability data from .
 
-
 === Informational ===
 
 Found 1 vulnerability in packages that you import, but there are no call
diff --git a/internal/scan/testdata/platform-two-imports.txt b/internal/scan/testdata/platform-two-imports.txt
index c4b1bf2..0445288 100644
--- a/internal/scan/testdata/platform-two-imports.txt
+++ b/internal/scan/testdata/platform-two-imports.txt
@@ -1,6 +1,5 @@
 Using govulncheck with vulnerability data from .
 
-
 === Informational ===
 
 Found 1 vulnerability in packages that you import, but there are no call
diff --git a/internal/scan/testdata/platform-two-os-only.txt b/internal/scan/testdata/platform-two-os-only.txt
index 53bcb94..68e54c8 100644
--- a/internal/scan/testdata/platform-two-os-only.txt
+++ b/internal/scan/testdata/platform-two-os-only.txt
@@ -1,6 +1,5 @@
 Using govulncheck with vulnerability data from .
 
-
 === Informational ===
 
 Found 1 vulnerability in packages that you import, but there are no call
diff --git a/internal/scan/text.go b/internal/scan/text.go
index 51e7bf4..0364d5e 100644
--- a/internal/scan/text.go
+++ b/internal/scan/text.go
@@ -130,9 +130,6 @@
 	called := 0
 	for _, findings := range byVuln {
 		if isCalled(findings) {
-			if called > 0 {
-				h.print("\n")
-			}
 			h.vulnerability(called, findings)
 			called++
 		}
@@ -141,7 +138,6 @@
 	if unCalled == 0 {
 		return
 	}
-	h.print("\n")
 	h.style(sectionStyle, "=== Informational ===\n")
 	h.print("\nFound ", unCalled)
 	h.print(choose(unCalled == 1, ` vulnerability`, ` vulnerabilities`))
@@ -151,9 +147,6 @@
 	index := 0
 	for _, findings := range byVuln {
 		if !isCalled(findings) {
-			if index > 0 {
-				h.print("\n")
-			}
 			h.vulnerability(index, findings)
 			index++
 		}
@@ -226,6 +219,7 @@
 		}
 		h.traces(module)
 	}
+	h.print("\n")
 }
 
 func (h *TextHandler) traces(traces []*findingSummary) {
@@ -258,7 +252,6 @@
 
 func (h *TextHandler) summary(findings []*findingSummary) {
 	counters := counters(findings)
-	h.print("\n")
 	if counters.VulnerabilitiesCalled == 0 {
 		h.print("No vulnerabilities found.\n")
 		return