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(flag): Support globstar for --skip-files and --skip-directories #4026

Merged
merged 4 commits into from
Apr 16, 2023

Conversation

simar7
Copy link
Member

@simar7 simar7 commented Apr 11, 2023

Description

This PR adds support for globstar (double asterisk) in skipping paths.

Go does not natively support this behaviour: golang/go#11862

Signed-off-by: Simar [email protected]

Related issues

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 self-assigned this Apr 11, 2023
Comment on lines -59 to +61
match, err := path.Match(pattern, filePath)
match, err := doublestar.Match(pattern, filePath)
Copy link
Member Author

@simar7 simar7 Apr 11, 2023

Choose a reason for hiding this comment

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

Go does not support ** natively. Therefore the need for this library.

https://goplay.tools/snippet/sdCuGYw7gWU

Signed-off-by: Simar <[email protected]>
@simar7 simar7 marked this pull request as ready for review April 11, 2023 04:45
@knqyf263 knqyf263 merged commit b43b19b into main Apr 16, 2023
@knqyf263 knqyf263 deleted the support-doobelstahr branch April 16, 2023 10:48
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.

2 participants