This repository was archived by the owner on Apr 10, 2019. It is now read-only.
Commit 25cd8f4
linters: fix: multiline gosec warnings not shown in gometalinter result
The gosec linter is printing a range expression like "1200-1204" for the
line number in some cases.
The gosec output in csv looks like:
/home/fho/git/test/example.go,1200-1204,SQL string formatting,MEDIUM,HIGH,"fmt.Sprintf(`
SELECT
%s,
FROM test
)"
The gometalinter line pattern was only expecting one or more digits as line
number.
This caused that some warnings did not match the pattern and did not
show up in the gometalinter results.
The Gosec pattern is changed to parse the first number as line number
and ignore an eventual following "-<NUMBER>" expression.
Gometalinter only supports to work with a single number for lines.1 parent 8edca99 commit 25cd8f4
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| |||
0 commit comments