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

feat(report): Include verbose message if no results found #7748

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simar7
Copy link
Member

@simar7 simar7 commented Oct 16, 2024

Description

Include a verbose message if no results found

Related discussion

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@simar7 simar7 requested a review from nikpivkin October 16, 2024 00:05
Comment on lines +57 to +59
if len(report.Results) == 0 {
log.Info("No results found")
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we drop the return value and since logger isn't passed in, it's makes it hard to test this.

@simar7
Copy link
Member Author

simar7 commented Oct 16, 2024

@knqyf263 @nikpivkin I'm open to ideas if there's a better way to solve this. I've run into this in the past and found it confusing as well, so I decided to create a small PR to see how we can proceed.

@nikpivkin
Copy link
Contributor

For me it's ok, if no errors occurred during the scan, then the scan completed successfully. On the other hand, I think users may have meant that it is not clear whether all packages were scanned or some were missed. But as noted, showing an empty table for each packet can be noisy.

Copy link

This PR is stale because it has been labeled with inactivity.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and will be auto-closed. label Dec 16, 2024
@knqyf263
Copy link
Collaborator

Sorry, this PR is a draft, and I missed it.

Ideally, I would add this kind of table.
#6501

But for the short term, this idea looks good.

@github-actions github-actions bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and will be auto-closed. label Dec 18, 2024
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

Successfully merging this pull request may close these issues.

3 participants