iancoleman/strcase

adding exceptions

Opened this issue · 5 comments

Thoughts on adding something similar?:

https://github.com/serenize/snaker/blob/a683aaf2d516deecd70cad0c72e3ca773ecfcef0/snaker.go#L100-L150

This would make it easier to use this for code generation. I.e. something like TEST_HTTP doesn't get converted to TestHttp (which isn't a go standard), rather TestHTTP.

I think this would also address issues like #12 (i.e. convert every capital letter after the first into lowercase, unless it matches an exception). This would convert CUSTOMER_ID into CustomerID if done properly.

Looks ok.

Only doubt is whether RAM should be on the list for the purpose of this tool.

I'll look into adding this, I think it's a good idea. Thanks for raising the issue.

I can't help but think it should be from the lint code file, and would work as a specific GolangCamelCase method.

Looks like this was partially added in 10b280f quite awhile back, enough for others to be able to specify their own acronyms. Not perfect, but I think it's enough to close this issue.

Actually, it looks like that functionality doesn't work as intended. No matter how I try and use ConfigureAcronym.