From 7838670b334c6ba85440789f2f3172612cc7154b Mon Sep 17 00:00:00 2001 From: Zvonimir Pavlinovic Date: Fri, 15 Mar 2024 16:05:36 +0000 Subject: [PATCH] cmd/govulncheck: add comment capability to fixups Change-Id: I24cc53840d96e97507243472bf6252883f895034 Reviewed-on: https://go-review.googlesource.com/c/vuln/+/571541 LUCI-TryBot-Result: Go LUCI Reviewed-by: Maceo Thompson Run-TryBot: Zvonimir Pavlinovic TryBot-Result: Gopher Robot --- cmd/govulncheck/testdata/stdlib/fixups.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmd/govulncheck/testdata/stdlib/fixups.json b/cmd/govulncheck/testdata/stdlib/fixups.json index be515b3..4665914 100644 --- a/cmd/govulncheck/testdata/stdlib/fixups.json +++ b/cmd/govulncheck/testdata/stdlib/fixups.json @@ -1,19 +1,23 @@ [ { "pattern": "\\.go:(\\d+):(\\d+):", - "replace": ".go:\u003cl\u003e:\u003cc\u003e:" + "replace": ".go:\u003cl\u003e:\u003cc\u003e:", + "comment": " mask line and column with and placeholders, resp." }, { "pattern": "\\\"line\\\":(\\s)*(\\d+)", - "replace": "\"line\": \u003cl\u003e" + "replace": "\"line\": \u003cl\u003e", + "comment": "modify position lines in json" }, { "pattern": "\\\"column\\\":(\\s)*(\\d+)", - "replace": "\"column\": \u003cc\u003e" + "replace": "\"column\": \u003cc\u003e", + "comment": "modify position columns in json" }, { "pattern": "\\\"offset\\\":(\\s)*(\\d+)", - "replace": "\"offset\": \u003co\u003e" + "replace": "\"offset\": \u003co\u003e", + "comment": "modify position offsets in json" }, { "pattern": "Scanning your code and (\\d+) packages across (\\d+)",