Skip to content

Commit

Permalink
Merge pull request securego#161 from jonmcclintock/allow-loader-errors
Browse files Browse the repository at this point in the history
[Issue 159] Allow loader errors so that processing continues
  • Loading branch information
gcmurphy committed Jan 29, 2018
2 parents 8125622 + f111d5d commit a293098
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a293098

Please sign in to comment.