Skip to content

Commit a319d34

Browse files
committed
Minor refactoring
1 parent 050989d commit a319d34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

warn/warn_load.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ func ruleLoadLocationWarning(f *build.File) []*LinterFinding {
1515
continue
1616
}
1717

18-
for i := 0; i < len(load.To); i++ {
18+
for i := 0; i < len(load.From); i++ {
1919
from := load.From[i]
2020

2121
expectedLocation, ok := tables.RuleLoadLocation[from.Name]
2222
if !ok || expectedLocation == load.Module.Value {
2323
continue
2424
}
2525

26-
f := makeLinterFinding(load.From[i], fmt.Sprintf("Rule %q must be loaded from %v.", from.Name, expectedLocation))
26+
f := makeLinterFinding(from, fmt.Sprintf("Rule %q must be loaded from %v.", from.Name, expectedLocation))
2727
findings = append(findings, f)
2828
}
2929

0 commit comments

Comments
 (0)