Skip to content

Commit 66de059

Browse files
committed
chore: fix default configuration
1 parent 3aede8c commit 66de059

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/golinters/revive/revive.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,10 @@ func toIssue(pass *analysis.Pass, object *jsonObject) goanalysis.Issue {
189189
func getConfig(cfg *config.ReviveSettings) (*lint.Config, error) {
190190
conf := defaultConfig()
191191

192-
if !reflect.DeepEqual(cfg, &config.ReviveSettings{}) {
192+
// Since the Go version is dynamic, this value must be neutralized in order to compare with a "zero value" of the configuration structure.
193+
zero := &config.ReviveSettings{Go: cfg.Go}
194+
195+
if !reflect.DeepEqual(cfg, zero) {
193196
rawRoot := createConfigMap(cfg)
194197
buf := bytes.NewBuffer(nil)
195198

0 commit comments

Comments
 (0)