Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what to do if import doesn't exist in project dependencies? #386

Open
peakle opened this issue Apr 12, 2022 · 4 comments
Open

what to do if import doesn't exist in project dependencies? #386

peakle opened this issue Apr 12, 2022 · 4 comments

Comments

@peakle
Copy link
Contributor

peakle commented Apr 12, 2022

currently ruleguard fails if it doesn't find package from dsl.import method

@mem
Copy link
Contributor

mem commented Sep 12, 2022

This might be related to #253 and #408

@peakle
Copy link
Contributor Author

peakle commented Sep 13, 2022

@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

@peakle
Copy link
Contributor Author

peakle commented Sep 13, 2022

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?

@peakle
Copy link
Contributor Author

peakle commented Sep 14, 2022

another one solution:

  • filter func in Importer which can be called (if exist) after/before Import method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants