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

Errors spamming the stderr output #1005

Open
another-rex opened this issue May 30, 2024 · 2 comments
Open

Errors spamming the stderr output #1005

another-rex opened this issue May 30, 2024 · 2 comments

Comments

@another-rex
Copy link
Collaborator

another-rex commented May 30, 2024

Some errors should only be displayed once, but spams the output because of its location in the code flow.

Currently the only example of this I have is :

https://github.com/google/osv-scanner/blob/main/internal/local/check.go/#L147-L148

Solution proposed:
Have some global hashmap that checks if this error has already been logged and don't repeat the log.

@G-Rath
Copy link
Collaborator

G-Rath commented May 30, 2024

Can you provide a reproduction for that specific example? as it sounds like a potential bug.

The whole concept though of not spamming errors sounds good

@another-rex
Copy link
Collaborator Author

Call osv-scanner --experimental-offline . without a local-db already set up, and it'll print one error per package that's scanned, since the error is in MakeRequest. So it's working as intended, it's just not great UX.

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