feat: remove deprecated linters from presets (#3405)

This commit is contained in:
Ludovic Fernandez 2022-12-08 01:14:32 +01:00 committed by GitHub
parent 49e5bc09b7
commit 67d57f4ed8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -895,6 +895,10 @@ func linterConfigsToMap(lcs []*linter.Config) map[string]*linter.Config {
func (m Manager) GetAllLinterConfigsForPreset(p string) []*linter.Config {
var ret []*linter.Config
for _, lc := range m.GetAllSupportedLinterConfigs() {
if lc.IsDeprecated() {
continue
}
for _, ip := range lc.InPresets {
if p == ip {
ret = append(ret, lc)