Skip to content

Conversation

@gokcelb
Copy link
Contributor

@gokcelb gokcelb commented Dec 13, 2024

Provide examples about how --only flag works in README.md and flag explanation.

There was no information about what kind of format to pass to the --only flag and this caused some issues with running complexity as expected. The examples provided via this change show the correct format.

Provide examples about how --only flag works in README.md and
flag explanation.

There was no information about what kind of format to pass to the --only
flag and this caused some issues with running complexity as expected.
The examples provided via this change show the correct format.
@joshuaclayton
Copy link
Contributor

I agree that the documentation is a good first step; I'd also consider adjusting the flag name (perhaps in a separate PR) so it's more clear what the flag is filtering against, and do a minor version bump since it's still pre-1.0.

I'd reviewed rg, which allows filtering based on a --glob flag. This isn't quite what we'd want (it supports regular expressions and is more permissive than what we'd want to start with, I think). fd, on the other hand, does provide something closer: -e/--extension. It can be called as fd -e md -e js for multiple extensions

So, we may want to adjust our standard case only to extension (with the e shorthand). This:

  1. improves clarity on what the flag does
  2. mirrors another CLI tool that allows filtering by multiple extensions

@gokcelb gokcelb merged commit 1631bb3 into main Dec 27, 2024
2 checks passed
@gokcelb
Copy link
Contributor Author

gokcelb commented Dec 27, 2024

I agree that the documentation is a good first step; I'd also consider adjusting the flag name (perhaps in a separate PR) so it's more clear what the flag is filtering against, and do a minor version bump since it's still pre-1.0.

I'd reviewed rg, which allows filtering based on a --glob flag. This isn't quite what we'd want (it supports regular expressions and is more permissive than what we'd want to start with, I think). fd, on the other hand, does provide something closer: -e/--extension. It can be called as fd -e md -e js for multiple extensions

So, we may want to adjust our standard case only to extension (with the e shorthand). This:

  1. improves clarity on what the flag does
  2. mirrors another CLI tool that allows filtering by multiple extensions

Thanks for the comment! I also think that may clarify the flag's purpose. I opened an issue for this.

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.

3 participants