1
0
mirror of https://github.com/securego/gosec.git synced 2025-11-29 22:37:59 +02:00

Refactor the rules tests to be able to configure the analyzer config per test sample

Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
This commit is contained in:
Cosmin Cojocar
2019-06-25 10:29:19 +02:00
parent 36a82ea85e
commit ed9934fa48
3 changed files with 82 additions and 81 deletions

View File

@@ -92,6 +92,11 @@ func NewAnalyzer(conf Config, tests bool, logger *log.Logger) *Analyzer {
}
}
// SetConfig upates the analyzer configuration
func (gosec *Analyzer) SetConfig(conf Config) {
gosec.config = conf
}
// LoadRules instantiates all the rules to be used when analyzing source
// packages
func (gosec *Analyzer) LoadRules(ruleDefinitions map[string]RuleBuilder) {