mirror of
https://github.com/securego/gosec.git
synced 2025-11-23 22:15:04 +02:00
Ensure ignores are handled properly for multi-line issues
Signed-off-by: Cosmin Cojocar <gcojocar@adobe.com>
This commit is contained in:
committed by
Cosmin Cojocar
parent
6d56592f09
commit
3188e3fb8e
@@ -123,7 +123,7 @@ func (i ignores) get(file string, line string) map[string][]issue.SuppressionInf
|
||||
start, end := i.parseLine(line)
|
||||
if is, ok := i[file]; ok {
|
||||
for _, i := range is {
|
||||
if i.start <= start && i.end >= end {
|
||||
if start <= i.start && end >= i.end {
|
||||
return i.suppressions
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user