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

Issue - 413 Support for wildcard in paths options #476

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

Conversation

rishijain
Copy link
Contributor

Check list:

Description:

This PR adds support for passing **(wildcard) paths to the .rubycritic.yml file. So now someone can do something like:

paths:
  - app
  - packs/*/app

This was requested here.

The way I have implemented is to basically find all the valid directories that the ** expands to, so for example:
if user passes packs/*/app and in the app, packs has 3 sub-directories in it but only 2 of them has app inside those sub-directories, I am resetting the options[:paths] to ['app', 'packs/pack1/app', 'packs/pack2/app' ].

@rishijain rishijain changed the title [Issue - 413 ] Support for wildcard in paths options Issue - 413 Support for wildcard in paths options Oct 25, 2023
Copy link
Collaborator

@etagwerker etagwerker left a comment

Choose a reason for hiding this comment

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

@rishijain This looks good, thanks!

Could you please add a note to the README to make sure people understand there is now support for wildcards in paths? Also, could you please add one or two test cases to test this new behavior?

Thank you! ❤️

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