mirror of
https://github.com/securego/gosec.git
synced 2025-07-17 01:12:33 +02:00
Allow excluding analyzers globally (#1180)
* This change does not exclude analyzers for inline comment * Changed the expected issues count for G103, G109 samples for test. Previously G115 has been included in the issue count * Show analyzers IDs(G115, G602) in gosec usage help * See #1175
This commit is contained in:
@ -27,7 +27,7 @@ func main() {
|
||||
intPtr = (*int)(unsafe.Pointer(addressHolder))
|
||||
fmt.Printf("\nintPtr=%p, *intPtr=%d.\n\n", intPtr, *intPtr)
|
||||
}
|
||||
`}, 3, gosec.NewConfig()},
|
||||
`}, 2, gosec.NewConfig()},
|
||||
{[]string{`
|
||||
package main
|
||||
|
||||
|
@ -20,7 +20,7 @@ func main() {
|
||||
value := int32(bigValue)
|
||||
fmt.Println(value)
|
||||
}
|
||||
`}, 2, gosec.NewConfig()},
|
||||
`}, 1, gosec.NewConfig()},
|
||||
{[]string{`
|
||||
package main
|
||||
|
||||
@ -38,7 +38,7 @@ func main() {
|
||||
fmt.Println(bigValue)
|
||||
}
|
||||
}
|
||||
`}, 2, gosec.NewConfig()},
|
||||
`}, 1, gosec.NewConfig()},
|
||||
{[]string{`
|
||||
package main
|
||||
|
||||
|
Reference in New Issue
Block a user