fix #302: fix concurrent astcache access

This commit is contained in:
Denis Isaev 2018-11-23 23:19:07 +03:00 committed by Isaev Denis
parent dba3907ff3
commit 255a39bcb1
4 changed files with 39 additions and 28 deletions

View file

@ -31,7 +31,12 @@ func newNolint2FileIssue(line int) result.Issue {
}
func newTestNolintProcessor(log logutils.Log) *Nolint {
return NewNolint(astcache.NewCache(log), log)
cache := astcache.LoadFromFilenames(log,
filepath.Join("testdata", "nolint.go"),
filepath.Join("testdata", "nolint2.go"),
filepath.Join("testdata", "nolint_bad_names.go"),
)
return NewNolint(cache, log)
}
func getOkLogger(ctrl *gomock.Controller) *logutils.MockLog {