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

Allow key-naming-case to support regular expression matching #56

Open
pedantic79 opened this issue Aug 28, 2024 · 1 comment
Open

Allow key-naming-case to support regular expression matching #56

pedantic79 opened this issue Aug 28, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@pedantic79
Copy link

I've using a customize version to find keys that don't match the convention I'm looking for, but have been trying to think of a more customizable way for this to be done.

For example, I'm okay with a key like externalATM, while the camel would want it to be externalAtm. My thought was to have key-naming-case support a "regex" setting, and have another parameter to set that regex.

So something like:

sloglint -key-naming-case regex -regex-naming-case '[a-z][a-zA-Z0-9]*' ./...

This would allow others more flexibility on how they want their keys name.

@tmzane
Copy link
Member

tmzane commented Feb 4, 2025

I agree, this would be useful to have, key-naming-case is kinda limited at the moment. I can work on the implementation, thanks for the idea.

@tmzane tmzane added the enhancement New feature or request label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants