feat: explain typecheck and remove it from the linter list (#3929)

This commit is contained in:
Ludovic Fernandez 2023-06-29 22:40:59 +02:00 committed by GitHub
parent a303529ad3
commit 79c78d6f6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 96 additions and 19 deletions

View file

@ -279,11 +279,15 @@ func TestNolintUnused(t *testing.T) {
createProcessor := func(t *testing.T, log *logutils.MockLog, enabledLinters []string) *Nolint {
enabledSetLog := logutils.NewMockLog()
enabledSetLog.On("Infof", "Active %d linters: %s", len(enabledLinters), enabledLinters)
cfg := &config.Config{Linters: config.Linters{DisableAll: true, Enable: enabledLinters}}
dbManager := lintersdb.NewManager(cfg, nil)
enabledLintersSet := lintersdb.NewEnabledSet(dbManager, lintersdb.NewValidator(dbManager), enabledSetLog, cfg)
enabledLintersMap, err := enabledLintersSet.GetEnabledLintersMap()
assert.NoError(t, err)
return NewNolint(log, dbManager, enabledLintersMap)
}