Skip to content

Commit 7cfdb7f

Browse files
committed
fix: local module path matching
Signed-off-by: Fernandez Ludovic <[email protected]>
1 parent 4f7ff3c commit 7cfdb7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/section/local_module.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type LocalModule struct {
1818
}
1919

2020
func (m *LocalModule) MatchSpecificity(spec *parse.GciImports) specificity.MatchSpecificity {
21-
if strings.HasPrefix(spec.Path, m.Path) {
21+
if spec.Path == m.Path || strings.HasPrefix(spec.Path, m.Path+"/") {
2222
return specificity.LocalModule{}
2323
}
2424

0 commit comments

Comments
 (0)