Skip to content

More accurate matching #1

@JohnAnthony

Description

@JohnAnthony

So, a little bit of thought about how to make this tool more useful.

  1. Under-matching: Banish currently just matches against the go.mod file, which means that, for example, a search for /foo/bar/baz will fail to notice the dependency if the go.mod file contains require /foo/bar. I think this will have to be some kind of trie matching by breaking the URI into components.
  2. Over-matching: If we fix the under-matching, we'll have a lot of matches on large imports - especially for monorepos - even if the actual Go imports never use the path we're matching against. The only solution for this, I think, is to search all the .go files in the repo and actually find out if the path is imported.
  3. Output: If we do point 1 and 2, we will have information about the files that contain relevant imports. We can list them right down to the line number.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions