diff --git a/cmd/govulncheck/testdata/strip/strip.ct b/cmd/govulncheck/testdata/strip/strip.ct index a149f89..45b4c01 100644 --- a/cmd/govulncheck/testdata/strip/strip.ct +++ b/cmd/govulncheck/testdata/strip/strip.ct @@ -38,4 +38,4 @@ Vulnerability #2: GO-2020-0015 Your code is affected by 2 vulnerabilities from 1 module. This scan found no other vulnerabilities in packages you import or modules you require. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/cmd/govulncheck/testdata/testfiles/binary-call/binary_call_text.ct b/cmd/govulncheck/testdata/testfiles/binary-call/binary_call_text.ct index 54ce1ff..82aa473 100644 --- a/cmd/govulncheck/testdata/testfiles/binary-call/binary_call_text.ct +++ b/cmd/govulncheck/testdata/testfiles/binary-call/binary_call_text.ct @@ -43,4 +43,4 @@ Your code is affected by 3 vulnerabilities from 2 modules. This scan also found 0 vulnerabilities in packages you import and 1 vulnerability in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/cmd/govulncheck/testdata/testfiles/binary-module/binary_module_text.ct b/cmd/govulncheck/testdata/testfiles/binary-module/binary_module_text.ct index b048f52..39305fd 100644 --- a/cmd/govulncheck/testdata/testfiles/binary-module/binary_module_text.ct +++ b/cmd/govulncheck/testdata/testfiles/binary-module/binary_module_text.ct @@ -45,4 +45,4 @@ Vulnerability #4: GO-2020-0015 Your code may be affected by 4 vulnerabilities. -Use -scan=symbol for more fine grained vulnerability detection. +Use '-scan symbol' for more fine grained vulnerability detection. diff --git a/cmd/govulncheck/testdata/testfiles/binary-package/binary_package_text.ct b/cmd/govulncheck/testdata/testfiles/binary-package/binary_package_text.ct index 52c22f1..ca3deb5 100644 --- a/cmd/govulncheck/testdata/testfiles/binary-package/binary_package_text.ct +++ b/cmd/govulncheck/testdata/testfiles/binary-package/binary_package_text.ct @@ -33,5 +33,5 @@ Vulnerability #3: GO-2021-0054 Your code may be affected by 3 vulnerabilities. This scan also found 1 vulnerability in modules you require. -Use -scan=symbol for more fine grained vulnerability detection and -show verbose -for more details. +Use '-scan symbol' for more fine grained vulnerability detection and '-show +verbose' for more details. diff --git a/cmd/govulncheck/testdata/testfiles/convert/convert_text.ct b/cmd/govulncheck/testdata/testfiles/convert/convert_text.ct index 5463674..91a175b 100644 --- a/cmd/govulncheck/testdata/testfiles/convert/convert_text.ct +++ b/cmd/govulncheck/testdata/testfiles/convert/convert_text.ct @@ -32,4 +32,4 @@ Your code is affected by 2 vulnerabilities from 2 modules. This scan also found 1 vulnerability in packages you import and 0 vulnerabilities in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/cmd/govulncheck/testdata/testfiles/extract/binary_extract.ct b/cmd/govulncheck/testdata/testfiles/extract/binary_extract.ct index 8c5726b..4316fad 100644 --- a/cmd/govulncheck/testdata/testfiles/extract/binary_extract.ct +++ b/cmd/govulncheck/testdata/testfiles/extract/binary_extract.ct @@ -43,7 +43,7 @@ Your code is affected by 3 vulnerabilities from 2 modules. This scan also found 0 vulnerabilities in packages you import and 1 vulnerability in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. # Test extract mode. Due to the size of the blob even for smallest programs, we # directly compare its output to a target vuln_blob.json file. diff --git a/cmd/govulncheck/testdata/testfiles/source-call/source_call_text.ct b/cmd/govulncheck/testdata/testfiles/source-call/source_call_text.ct index 51d05fa..172e2d8 100644 --- a/cmd/govulncheck/testdata/testfiles/source-call/source_call_text.ct +++ b/cmd/govulncheck/testdata/testfiles/source-call/source_call_text.ct @@ -42,7 +42,7 @@ Your code is affected by 3 vulnerabilities from 2 modules. This scan also found 0 vulnerabilities in packages you import and 2 vulnerabilities in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. ##### # Test of basic govulncheck in source mode with expanded traces @@ -98,7 +98,7 @@ Your code is affected by 3 vulnerabilities from 2 modules. This scan also found 0 vulnerabilities in packages you import and 2 vulnerabilities in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. ##### # Test of basic govulncheck in source mode with the -show verbose flag diff --git a/cmd/govulncheck/testdata/testfiles/source-call/source_informational_text.ct b/cmd/govulncheck/testdata/testfiles/source-call/source_informational_text.ct index cd6131e..bab2410 100644 --- a/cmd/govulncheck/testdata/testfiles/source-call/source_informational_text.ct +++ b/cmd/govulncheck/testdata/testfiles/source-call/source_informational_text.ct @@ -11,4 +11,4 @@ Your code is affected by 0 vulnerabilities. This scan also found 1 vulnerability in packages you import and 1 vulnerability in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/cmd/govulncheck/testdata/testfiles/source-call/source_multientry_text.ct b/cmd/govulncheck/testdata/testfiles/source-call/source_multientry_text.ct index 82191a4..5e2a2de 100644 --- a/cmd/govulncheck/testdata/testfiles/source-call/source_multientry_text.ct +++ b/cmd/govulncheck/testdata/testfiles/source-call/source_multientry_text.ct @@ -22,7 +22,7 @@ Your code is affected by 1 vulnerability from 1 module. This scan also found 0 vulnerabilities in packages you import and 1 vulnerability in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. ##### # Test for multple call stacks in source mode with expanded traces diff --git a/cmd/govulncheck/testdata/testfiles/source-call/source_replace_text.ct b/cmd/govulncheck/testdata/testfiles/source-call/source_replace_text.ct index 49ac2fa..c0cec05 100644 --- a/cmd/govulncheck/testdata/testfiles/source-call/source_replace_text.ct +++ b/cmd/govulncheck/testdata/testfiles/source-call/source_replace_text.ct @@ -22,4 +22,4 @@ Your code is affected by 1 vulnerability from 1 module. This scan also found 0 vulnerabilities in packages you import and 2 vulnerabilities in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/cmd/govulncheck/testdata/testfiles/source-call/source_stdlib_text.ct b/cmd/govulncheck/testdata/testfiles/source-call/source_stdlib_text.ct index 8fea36c..8ff9aa8 100644 --- a/cmd/govulncheck/testdata/testfiles/source-call/source_stdlib_text.ct +++ b/cmd/govulncheck/testdata/testfiles/source-call/source_stdlib_text.ct @@ -19,7 +19,7 @@ Vulnerability #1: GO-2022-0969 Your code is affected by 1 vulnerability from the Go standard library. This scan found no other vulnerabilities in packages you import or modules you require. -Use -show verbose for more details. +Use '-show verbose' for more details. ##### # Test finding stdlib vulnerability in source mode with expanded traces @@ -44,4 +44,4 @@ Vulnerability #1: GO-2022-0969 Your code is affected by 1 vulnerability from the Go standard library. This scan found no other vulnerabilities in packages you import or modules you require. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/cmd/govulncheck/testdata/testfiles/source-call/source_subdir_text.ct b/cmd/govulncheck/testdata/testfiles/source-call/source_subdir_text.ct index e9c6301..bfee982 100644 --- a/cmd/govulncheck/testdata/testfiles/source-call/source_subdir_text.ct +++ b/cmd/govulncheck/testdata/testfiles/source-call/source_subdir_text.ct @@ -21,7 +21,7 @@ Your code is affected by 1 vulnerability from 1 module. This scan also found 0 vulnerabilities in packages you import and 2 vulnerabilities in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. ##### # Test govulncheck runs on the subdirectory of a module @@ -48,4 +48,4 @@ Your code is affected by 1 vulnerability from 1 module. This scan also found 0 vulnerabilities in packages you import and 2 vulnerabilities in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/cmd/govulncheck/testdata/testfiles/source-call/source_wholemodvuln_text.ct b/cmd/govulncheck/testdata/testfiles/source-call/source_wholemodvuln_text.ct index 1d63544..3a2ab0b 100644 --- a/cmd/govulncheck/testdata/testfiles/source-call/source_wholemodvuln_text.ct +++ b/cmd/govulncheck/testdata/testfiles/source-call/source_wholemodvuln_text.ct @@ -20,4 +20,4 @@ Your code is affected by 1 vulnerability from 1 module. This scan also found 0 vulnerabilities in packages you import and 1 vulnerability in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/cmd/govulncheck/testdata/testfiles/source-module/source_module_text.ct b/cmd/govulncheck/testdata/testfiles/source-module/source_module_text.ct index bd5e683..108471d 100644 --- a/cmd/govulncheck/testdata/testfiles/source-module/source_module_text.ct +++ b/cmd/govulncheck/testdata/testfiles/source-module/source_module_text.ct @@ -27,7 +27,7 @@ Vulnerability #2: GO-2021-0113 Your code may be affected by 2 vulnerabilities. -Use -scan=symbol for more fine grained vulnerability detection. +Use '-scan symbol' for more fine grained vulnerability detection. ##### # -show verbose flag should only show module results with scan level module @@ -57,4 +57,4 @@ Vulnerability #2: GO-2021-0113 Your code may be affected by 2 vulnerabilities. -Use -scan=symbol for more fine grained vulnerability detection. +Use '-scan symbol' for more fine grained vulnerability detection. diff --git a/cmd/govulncheck/testdata/testfiles/source-package/source_package_text.ct b/cmd/govulncheck/testdata/testfiles/source-package/source_package_text.ct index 3c28087..029db62 100644 --- a/cmd/govulncheck/testdata/testfiles/source-package/source_package_text.ct +++ b/cmd/govulncheck/testdata/testfiles/source-package/source_package_text.ct @@ -17,8 +17,8 @@ Vulnerability #1: GO-2021-0113 Your code may be affected by 1 vulnerability. This scan also found 1 vulnerability in modules you require. -Use -scan=symbol for more fine grained vulnerability detection and -show verbose -for more details. +Use '-scan symbol' for more fine grained vulnerability detection and '-show +verbose' for more details. ##### # Test for package level scan with the -show verbose flag @@ -50,4 +50,4 @@ Vulnerability #1: GO-2022-0969 Your code may be affected by 1 vulnerability. This scan also found 1 vulnerability in modules you require. -Use -scan=symbol for more fine grained vulnerability detection. +Use '-scan symbol' for more fine grained vulnerability detection. diff --git a/internal/scan/testdata/binary.txt b/internal/scan/testdata/binary.txt index 98ba209..4649fe5 100644 --- a/internal/scan/testdata/binary.txt +++ b/internal/scan/testdata/binary.txt @@ -22,4 +22,4 @@ Vulnerability #2: GO-0000-0001 Your code is affected by 2 vulnerabilities from 1 module and the Go standard library. This scan found no other vulnerabilities in packages you import or modules you require. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/internal/scan/testdata/mixed-calls.txt b/internal/scan/testdata/mixed-calls.txt index e494f55..f859dc7 100644 --- a/internal/scan/testdata/mixed-calls.txt +++ b/internal/scan/testdata/mixed-calls.txt @@ -13,4 +13,4 @@ Vulnerability #1: GO-0000-0001 Your code is affected by 1 vulnerability from 1 module. This scan found no other vulnerabilities in packages you import or modules you require. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/internal/scan/testdata/module-vuln.txt b/internal/scan/testdata/module-vuln.txt index 23dd32f..f59ca71 100644 --- a/internal/scan/testdata/module-vuln.txt +++ b/internal/scan/testdata/module-vuln.txt @@ -10,4 +10,4 @@ Vulnerability #1: GO-0000-0001 Your code may be affected by 1 vulnerability. -Use -scan=symbol for more fine grained vulnerability detection. +Use '-scan symbol' for more fine grained vulnerability detection. diff --git a/internal/scan/testdata/multi-stack-modlevel.txt b/internal/scan/testdata/multi-stack-modlevel.txt index 55c8013..0857e87 100644 --- a/internal/scan/testdata/multi-stack-modlevel.txt +++ b/internal/scan/testdata/multi-stack-modlevel.txt @@ -17,4 +17,4 @@ Vulnerability #2: GO-0000-0001 Your code may be affected by 2 vulnerabilities. -Use -scan=symbol for more fine grained vulnerability detection. +Use '-scan symbol' for more fine grained vulnerability detection. diff --git a/internal/scan/testdata/multi-stacks.txt b/internal/scan/testdata/multi-stacks.txt index ad64c0a..17f0c16 100644 --- a/internal/scan/testdata/multi-stacks.txt +++ b/internal/scan/testdata/multi-stacks.txt @@ -21,4 +21,4 @@ Vulnerability #1: GO-0000-0001 Your code is affected by 1 vulnerability from the Go standard library. This scan found no other vulnerabilities in packages you import or modules you require. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/internal/scan/testdata/package-vuln.txt b/internal/scan/testdata/package-vuln.txt index 84ab6e8..25ddbe6 100644 --- a/internal/scan/testdata/package-vuln.txt +++ b/internal/scan/testdata/package-vuln.txt @@ -10,5 +10,5 @@ Vulnerability #1: GO-0000-0001 Your code may be affected by 1 vulnerability. This scan also found 0 vulnerabilities in modules you require. -Use -scan=symbol for more fine grained vulnerability detection and -show verbose -for more details. +Use '-scan symbol' for more fine grained vulnerability detection and '-show +verbose' for more details. diff --git a/internal/scan/testdata/platform-all.txt b/internal/scan/testdata/platform-all.txt index 0c114ef..5f75349 100644 --- a/internal/scan/testdata/platform-all.txt +++ b/internal/scan/testdata/platform-all.txt @@ -6,4 +6,4 @@ Your code is affected by 0 vulnerabilities. This scan also found 1 vulnerability in packages you import and 0 vulnerabilities in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/internal/scan/testdata/platform-one-arch-only.txt b/internal/scan/testdata/platform-one-arch-only.txt index 0c114ef..5f75349 100644 --- a/internal/scan/testdata/platform-one-arch-only.txt +++ b/internal/scan/testdata/platform-one-arch-only.txt @@ -6,4 +6,4 @@ Your code is affected by 0 vulnerabilities. This scan also found 1 vulnerability in packages you import and 0 vulnerabilities in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/internal/scan/testdata/platform-one-import.txt b/internal/scan/testdata/platform-one-import.txt index 0c114ef..5f75349 100644 --- a/internal/scan/testdata/platform-one-import.txt +++ b/internal/scan/testdata/platform-one-import.txt @@ -6,4 +6,4 @@ Your code is affected by 0 vulnerabilities. This scan also found 1 vulnerability in packages you import and 0 vulnerabilities in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/internal/scan/testdata/platform-two-imports.txt b/internal/scan/testdata/platform-two-imports.txt index 0c114ef..5f75349 100644 --- a/internal/scan/testdata/platform-two-imports.txt +++ b/internal/scan/testdata/platform-two-imports.txt @@ -6,4 +6,4 @@ Your code is affected by 0 vulnerabilities. This scan also found 1 vulnerability in packages you import and 0 vulnerabilities in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/internal/scan/testdata/platform-two-os-only.txt b/internal/scan/testdata/platform-two-os-only.txt index 0c114ef..5f75349 100644 --- a/internal/scan/testdata/platform-two-os-only.txt +++ b/internal/scan/testdata/platform-two-os-only.txt @@ -6,4 +6,4 @@ Your code is affected by 0 vulnerabilities. This scan also found 1 vulnerability in packages you import and 0 vulnerabilities in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/internal/scan/testdata/source.txt b/internal/scan/testdata/source.txt index 6fb2337..4e372c2 100644 --- a/internal/scan/testdata/source.txt +++ b/internal/scan/testdata/source.txt @@ -14,4 +14,4 @@ Your code is affected by 1 vulnerability from the Go standard library. This scan also found 0 vulnerabilities in packages you import and 1 vulnerability in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/internal/scan/testdata/source_traces.txt b/internal/scan/testdata/source_traces.txt index e9e6f34..89ea0d7 100644 --- a/internal/scan/testdata/source_traces.txt +++ b/internal/scan/testdata/source_traces.txt @@ -16,4 +16,4 @@ Your code is affected by 1 vulnerability from the Go standard library. This scan also found 0 vulnerabilities in packages you import and 1 vulnerability in modules you require, but your code doesn't appear to call these vulnerabilities. -Use -show verbose for more details. +Use '-show verbose' for more details. diff --git a/internal/scan/text.go b/internal/scan/text.go index e69b284..bc2a589 100644 --- a/internal/scan/text.go +++ b/internal/scan/text.go @@ -55,9 +55,9 @@ const ( noOtherVulnsMessage = `No other vulnerabilities found.` - verboseMessage = `-show verbose for more details` + verboseMessage = `'-show verbose' for more details` - symbolMessage = `-scan=symbol for more fine grained vulnerability detection` + symbolMessage = `'-scan symbol' for more fine grained vulnerability detection` ) func (h *TextHandler) Show(show []string) {