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

Add wildcards to codemod selection arguments #18

Merged
merged 2 commits into from
Mar 26, 2024
Merged

Conversation

nahsra
Copy link
Contributor

@nahsra nahsra commented Feb 28, 2024

This PR adds a wildcarding ability to pass to --codemod-include (and exclude).

This PR adds a wildcarding ability to pass to `--codemod-include` (and exclude).
cli.md Outdated
- All codemod rules are loaded by default unless `--codemode-include` specifies a list. `-codemode-exclude` works off all default codemods.
- Specifying a `--codemod-include`or `--codemod-exclude` that references a non-existent codemod will result in an error
- Specifying a `--codemod-include` or `--codemod-exclude` that references a non-existent codemod will result in an error
- You can specify a simple wildcard for `--codemod-include` and `--codemod-exclude` (e.g., `--codemod-include=acme:*`). If this pattern doesn't match any codemods, an error will result.
Copy link
Member

Choose a reason for hiding this comment

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

I think it should be valid to pass a pattern that doesn't match any codemods. I'm also wondering whether we should revisit the behavior for explicitly selecting a non-existent codemod. It feels to me like maybe this should be a warning instead of an error? Does this make anything easier where upstream users are concerned?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe not -- a warning sounds ok.

@nahsra nahsra requested review from drdavella March 8, 2024 18:59
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