sloglint icon indicating copy to clipboard operation
sloglint copied to clipboard

Allow key-naming-case to support regular expression matching

Open pedantic79 opened this issue 5 months ago • 0 comments

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.

pedantic79 avatar Aug 28 '24 17:08 pedantic79