go-ruleguard
go-ruleguard copied to clipboard
what to do if import doesn't exist in project dependencies?
trafficstars
currently ruleguard fails if it doesn't find package from dsl.import method
This might be related to #253 and #408
@mem this issue about third party packages imported in rules such as this one for example: https://github.com/delivery-club/delivery-club-rules/blob/462a5e373a3d63ec51a8687cbb6dbc0379ac30b3/rules.go#L487
solutions that i can imagine now:
- add option (disabled by default) which will skip rule if imported package doesn't exist in project
- always skip rule if it doensn't exist in project
what do you think @quasilyte?
another one solution:
- filter func in Importer which can be called (if exist) after/before Import method