mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
fix #302: fix concurrent astcache access
This commit is contained in:
parent
dba3907ff3
commit
255a39bcb1
4 changed files with 39 additions and 28 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue