trivy icon indicating copy to clipboard operation
trivy copied to clipboard

feat: use fs.WalkDir instead of filepath.WalkDir

Open lebauce opened this issue 1 year ago • 3 comments

Description

In fs walker, filepath.WalkDir is used when fs.WalkDir is used almost everywhere else. There are subtle differences, for instance the root directory being a symlink, between the 2 causing inconsistencies between the fs walk and deb post analyze walk. This PR switches the fs walker to the newer fs.WalkDir interface.

Related issues

  • Close #XXX

Related PRs

  • [ ] #XXX
  • [ ] #YYY

Remove this section if you don't have related PRs.

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

lebauce avatar Mar 05 '24 13:03 lebauce

Hello @lebauce Thanks for your PR!

Looks like the tests are broken now. Can you take a look?

Regards, Dmitriy

DmitriyLewen avatar Mar 06 '24 07:03 DmitriyLewen

@DmitriyLewen Yes, sorry about that. Fixing the tests and putting it as "draft" until it's fixed

lebauce avatar Mar 06 '24 14:03 lebauce

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

github-actions[bot] avatar May 06 '24 00:05 github-actions[bot]