mirror of
https://github.com/securego/gosec.git
synced 2024-11-05 19:45:51 +00:00
[Issue 159] Allow loader errors so that processing continues if there's a package loading problem.
This commit is contained in:
parent
07a2eecabe
commit
846c9ffc7c
1 changed files with 5 additions and 1 deletions
|
@ -96,7 +96,11 @@ func (gas *Analyzer) LoadRules(ruleDefinitions ...RuleBuilder) {
|
|||
|
||||
// Process kicks off the analysis process for a given package
|
||||
func (gas *Analyzer) Process(packagePaths ...string) error {
|
||||
packageConfig := loader.Config{Build: &build.Default, ParserMode: parser.ParseComments}
|
||||
packageConfig := loader.Config{
|
||||
Build: &build.Default,
|
||||
ParserMode: parser.ParseComments,
|
||||
AllowErrors: true,
|
||||
}
|
||||
for _, packagePath := range packagePaths {
|
||||
abspath, _ := filepath.Abs(packagePath)
|
||||
gas.logger.Println("Searching directory:", abspath)
|
||||
|
|
Loading…
Reference in a new issue