mirror of
https://github.com/securego/gosec.git
synced 2025-11-23 22:15:04 +02:00
Add a flag which allows to scan also the tests files
Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
This commit is contained in:
committed by
Cosmin Cojocar
parent
f1d49a6945
commit
b49c9532a8
@@ -25,12 +25,13 @@ var _ = Describe("gosec rules", func() {
|
||||
analyzer *gosec.Analyzer
|
||||
runner func(string, []testutils.CodeSample, ...option)
|
||||
buildTags []string
|
||||
tests bool
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
logger, _ = testutils.NewLogger()
|
||||
config = gosec.NewConfig()
|
||||
analyzer = gosec.NewAnalyzer(config, logger)
|
||||
analyzer = gosec.NewAnalyzer(config, tests, logger)
|
||||
runner = func(rule string, samples []testutils.CodeSample, options ...option) {
|
||||
for _, o := range options {
|
||||
config.SetGlobal(o.name, o.value)
|
||||
|
||||
Reference in New Issue
Block a user