forbidigo: better support for configuring complex rules (#3612)

This commit is contained in:
Patrick Ohly 2023-05-31 22:33:20 +02:00 committed by GitHub
parent 8fde4632fa
commit afd0ba5278
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 125 additions and 10 deletions

View file

@ -427,6 +427,10 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
linter.NewConfig(golinters.NewForbidigo(forbidigoCfg)).
WithSince("v1.34.0").
WithPresets(linter.PresetStyle).
// Strictly speaking,
// the additional information is only needed when forbidigoCfg.AnalyzeTypes is chosen by the user.
// But we don't know that here in all cases (sometimes config is not loaded),
// so we have to assume that it is needed to be on the safe side.
WithLoadForGoAnalysis().
WithURL("https://github.com/ashanbrown/forbidigo"),