-
Notifications
You must be signed in to change notification settings - Fork 510
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
Allowing users to integrate external checks via blank-imports #3095
Labels
Comments
With some hacky local modifications (see
|
Amazing! Thanks @spencerschrock |
Instead of exporting |
2 tasks
Stale issue message |
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Original proposal
In #3055 @naveensrinivasan proposed using the
plugin
functionality (https://pkg.go.dev/plugin) to handle:While
plugin
exists, it comes with many constraints and warnings.blank-import
Instead, I want to focus on the blank-import approach, as that's what scorecard does today for its own checks:
scorecard/checks/binary_artifact.go
Lines 24 to 36 in bfd5357
If we make the necessary changes to allow external modules to do the same, custom checks becomes a possibility:
Imagine some develops a custom, external check in their repo:
github.com/foo/mycustomcheck
If a consumer uses a small wrapper around scorecard's main function, the check could be integrated just by adding blank-imports, without modifying the scorecard code themselves:
Changes required
RegisterCheck
checkDocs.GetCheck(check.Name)
which will work with external checksThe text was updated successfully, but these errors were encountered: