Skip to content

Commit

Permalink
refactor: process KindMap even when not indexing (#1882)
Browse files Browse the repository at this point in the history
**What type of PR is this?**
Other

**What package or component does this PR mostly affect?**
all

**What does this PR do? Why is it needed?**

I think kind mapping is unrelated to whether indexing is enabled or not?
  • Loading branch information
jbedard authored Aug 21, 2024
1 parent d0a54d3 commit be4f484
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/gazelle/fix-update.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,10 @@ func runFixUpdate(wd string, cmd command, args []string) (err error) {
// If this file is ignored or if Gazelle was not asked to update this
// directory, just index the build file and move on.
if !update {
for _, repl := range c.KindMap {
mrslv.MappedKind(rel, repl)
}
if c.IndexLibraries && f != nil {
for _, repl := range c.KindMap {
mrslv.MappedKind(rel, repl)
}
for _, r := range f.Rules {
ruleIndex.AddRule(c, r, f)
}
Expand Down

0 comments on commit be4f484

Please sign in to comment.