diff --git a/cmd/gazelle/fix-update.go b/cmd/gazelle/fix-update.go index b5086e26b..f55dbbff2 100644 --- a/cmd/gazelle/fix-update.go +++ b/cmd/gazelle/fix-update.go @@ -245,6 +245,14 @@ func runFixUpdate(cmd command, args []string) (err error) { loads := genericLoads for _, lang := range languages { cexts = append(cexts, lang) + } + + c, err := newFixUpdateConfiguration(cmd, args, cexts) + if err != nil { + return err + } + + for _, lang := range filterLanguages(c, languages) { for kind, info := range lang.Kinds() { mrslv.AddBuiltin(kind, lang) kinds[kind] = info @@ -253,11 +261,6 @@ func runFixUpdate(cmd command, args []string) (err error) { } ruleIndex := resolve.NewRuleIndex(mrslv.Resolver) - c, err := newFixUpdateConfiguration(cmd, args, cexts) - if err != nil { - return err - } - if err := fixRepoFiles(c, loads); err != nil { return err }