feat: disable copyloopvar and intrange on Go < 1.22 (#4397)

This commit is contained in:
Ludovic Fernandez 2024-02-19 14:58:58 +01:00 committed by GitHub
parent c65868c105
commit 64492b5e59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 148 additions and 32 deletions

View file

@ -303,7 +303,8 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
linter.NewConfig(golinters.NewCopyLoopVar()).
WithSince("v1.57.0").
WithPresets(linter.PresetStyle).
WithURL("https://github.com/karamaru-alpha/copyloopvar"),
WithURL("https://github.com/karamaru-alpha/copyloopvar").
WithNoopFallback(m.cfg, linter.IsGoLowerThanGo122()),
linter.NewConfig(golinters.NewCyclop(cyclopCfg)).
WithSince("v1.37.0").
@ -617,7 +618,8 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
linter.NewConfig(golinters.NewIntrange()).
WithSince("v1.57.0").
WithURL("https://github.com/ckaznocha/intrange"),
WithURL("https://github.com/ckaznocha/intrange").
WithNoopFallback(m.cfg, linter.IsGoLowerThanGo122()),
linter.NewConfig(golinters.NewIreturn(ireturnCfg)).
WithSince("v1.43.0").