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: add info log message about dev deps suppression #6211

Conversation

DmitriyLewen
Copy link
Contributor

Description

By default, we suppress Dev dependencies (npm, yarn is currently support only).
We need to show info about it.

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).

@DmitriyLewen DmitriyLewen self-assigned this Feb 27, 2024
Copy link
Collaborator

@knqyf263 knqyf263 left a comment

Choose a reason for hiding this comment

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

What if showing the log message here? The downside is it is performed on the server side in client/server mode.

// excludeDevDeps removes development dependencies from the list of applications
func excludeDevDeps(apps []ftypes.Application, include bool) {
if include {
return
}
for i := range apps {
apps[i].Libraries = lo.Filter(apps[i].Libraries, func(lib ftypes.Package, index int) bool {
return !lib.Dev
})
}
}

@DmitriyLewen
Copy link
Contributor Author

The downside is it is performed on the server side in client/server mode.

This is not good. I think that users rarely check server logs. In this case, they can easily miss this information.

@DmitriyLewen
Copy link
Contributor Author

But after some thought i realized that your solution looks better because in my solution we will show this message even if the --include-dev-deps flag is enabled.

I will update PR.

@DmitriyLewen
Copy link
Contributor Author

@knqyf263 changed in 329b5fd

@DmitriyLewen DmitriyLewen marked this pull request as ready for review February 27, 2024 12:34
pkg/scanner/local/scan.go Outdated Show resolved Hide resolved
pkg/scanner/local/scan.go Outdated Show resolved Hide resolved
DmitriyLewen and others added 2 commits February 28, 2024 09:48
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
@knqyf263 knqyf263 added this pull request to the merge queue Feb 28, 2024
github-merge-queue bot pushed a commit that referenced this pull request Feb 28, 2024
Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 28, 2024
@knqyf263 knqyf263 added this pull request to the merge queue Feb 28, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 28, 2024
@knqyf263 knqyf263 added this pull request to the merge queue Mar 4, 2024
Merged via the queue into aquasecurity:main with commit 7cb6c02 Mar 4, 2024
12 checks passed
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.

None yet

2 participants