-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/govulncheck: make fixup part of a test case
Change-Id: I01eeeef443fd0b1e180c90b35240f1f17c211b19 Reviewed-on: https://go-review.googlesource.com/c/vuln/+/571540 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Maceo Thompson <maceothompson@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
- Loading branch information
1 parent
84e1906
commit df69562
Showing
5 changed files
with
221 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[ | ||
{ | ||
"pattern": "\\.go:(\\d+):(\\d+):", | ||
"replace": ".go:\u003cl\u003e:\u003cc\u003e:" | ||
}, | ||
{ | ||
"pattern": "\\\"line\\\":(\\s)*(\\d+)", | ||
"replace": "\"line\": \u003cl\u003e" | ||
}, | ||
{ | ||
"pattern": "\\\"column\\\":(\\s)*(\\d+)", | ||
"replace": "\"column\": \u003cc\u003e" | ||
}, | ||
{ | ||
"pattern": "\\\"offset\\\":(\\s)*(\\d+)", | ||
"replace": "\"offset\": \u003co\u003e" | ||
}, | ||
{ | ||
"pattern": "heap\\.go:(\\d+)", | ||
"replace": "N" | ||
}, | ||
{ | ||
"pattern": "Scanning your code and (\\d+) packages across (\\d+)", | ||
"replace": "Scanning your code and P packages across M" | ||
}, | ||
{ | ||
"pattern": "Scanner: govulncheck@v.*", | ||
"replace": "Scanner: govulncheck@v1.0.0" | ||
}, | ||
{ | ||
"pattern": "\"([^\"]*\") is a file", | ||
"replace": "govulncheck: myfile is a file" | ||
}, | ||
{ | ||
"pattern": "\"scanner_version\": \"[^\"]*\"", | ||
"replace": "\"scanner_version\": \"v0.0.0-00000000000-20000101010101\"" | ||
}, | ||
{ | ||
"pattern": "file:///(.*)/testdata/(.*)/vulndb", | ||
"replace": "testdata/vulndb" | ||
}, | ||
{ | ||
"pattern": "package (.*) is not in (GOROOT|std) (.*)", | ||
"replace": "package foo is not in GOROOT (/tmp/foo)" | ||
}, | ||
{ | ||
"pattern": "modified (.*)\\)", | ||
"replace": "modified 01 Jan 21 00:00 UTC)" | ||
}, | ||
{ | ||
"pattern": "Go: (go1.[\\.\\d]*|devel).*", | ||
"replace": "Go: go1.18" | ||
}, | ||
{ | ||
"pattern": "\"go_version\": \"go[^\\s\"]*\"", | ||
"replace": "\"go_version\": \"go1.18\"" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[ | ||
{ | ||
"pattern": "\\.go:(\\d+):(\\d+):", | ||
"replace": ".go:\u003cl\u003e:\u003cc\u003e:" | ||
}, | ||
{ | ||
"pattern": "\\\"line\\\":(\\s)*(\\d+)", | ||
"replace": "\"line\": \u003cl\u003e" | ||
}, | ||
{ | ||
"pattern": "\\\"column\\\":(\\s)*(\\d+)", | ||
"replace": "\"column\": \u003cc\u003e" | ||
}, | ||
{ | ||
"pattern": "\\\"offset\\\":(\\s)*(\\d+)", | ||
"replace": "\"offset\": \u003co\u003e" | ||
}, | ||
{ | ||
"pattern": "heap\\.go:(\\d+)", | ||
"replace": "N" | ||
}, | ||
{ | ||
"pattern": "Scanning your code and (\\d+) packages across (\\d+)", | ||
"replace": "Scanning your code and P packages across M" | ||
}, | ||
{ | ||
"pattern": "Scanner: govulncheck@v.*", | ||
"replace": "Scanner: govulncheck@v1.0.0" | ||
}, | ||
{ | ||
"pattern": "\"([^\"]*\") is a file", | ||
"replace": "govulncheck: myfile is a file" | ||
}, | ||
{ | ||
"pattern": "\"scanner_version\": \"[^\"]*\"", | ||
"replace": "\"scanner_version\": \"v0.0.0-00000000000-20000101010101\"" | ||
}, | ||
{ | ||
"pattern": "file:///(.*)/testdata/(.*)/vulndb", | ||
"replace": "testdata/vulndb" | ||
}, | ||
{ | ||
"pattern": "package (.*) is not in (GOROOT|std) (.*)", | ||
"replace": "package foo is not in GOROOT (/tmp/foo)" | ||
}, | ||
{ | ||
"pattern": "modified (.*)\\)", | ||
"replace": "modified 01 Jan 21 00:00 UTC)" | ||
}, | ||
{ | ||
"pattern": "Go: (go1.[\\.\\d]*|devel).*", | ||
"replace": "Go: go1.18" | ||
}, | ||
{ | ||
"pattern": "\"go_version\": \"go[^\\s\"]*\"", | ||
"replace": "\"go_version\": \"go1.18\"" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[ | ||
{ | ||
"pattern": "\\.go:(\\d+):(\\d+):", | ||
"replace": ".go:\u003cl\u003e:\u003cc\u003e:" | ||
}, | ||
{ | ||
"pattern": "\\\"line\\\":(\\s)*(\\d+)", | ||
"replace": "\"line\": \u003cl\u003e" | ||
}, | ||
{ | ||
"pattern": "\\\"column\\\":(\\s)*(\\d+)", | ||
"replace": "\"column\": \u003cc\u003e" | ||
}, | ||
{ | ||
"pattern": "\\\"offset\\\":(\\s)*(\\d+)", | ||
"replace": "\"offset\": \u003co\u003e" | ||
}, | ||
{ | ||
"pattern": "heap\\.go:(\\d+)", | ||
"replace": "N" | ||
}, | ||
{ | ||
"pattern": "Scanning your code and (\\d+) packages across (\\d+)", | ||
"replace": "Scanning your code and P packages across M" | ||
}, | ||
{ | ||
"pattern": "Scanner: govulncheck@v.*", | ||
"replace": "Scanner: govulncheck@v1.0.0" | ||
}, | ||
{ | ||
"pattern": "\"([^\"]*\") is a file", | ||
"replace": "govulncheck: myfile is a file" | ||
}, | ||
{ | ||
"pattern": "\"scanner_version\": \"[^\"]*\"", | ||
"replace": "\"scanner_version\": \"v0.0.0-00000000000-20000101010101\"" | ||
}, | ||
{ | ||
"pattern": "file:///(.*)/testdata/(.*)/vulndb", | ||
"replace": "testdata/vulndb" | ||
}, | ||
{ | ||
"pattern": "package (.*) is not in (GOROOT|std) (.*)", | ||
"replace": "package foo is not in GOROOT (/tmp/foo)" | ||
}, | ||
{ | ||
"pattern": "modified (.*)\\)", | ||
"replace": "modified 01 Jan 21 00:00 UTC)" | ||
}, | ||
{ | ||
"pattern": "Go: (go1.[\\.\\d]*|devel).*", | ||
"replace": "Go: go1.18" | ||
}, | ||
{ | ||
"pattern": "\"go_version\": \"go[^\\s\"]*\"", | ||
"replace": "\"go_version\": \"go1.18\"" | ||
} | ||
] |