Closed AndreaWalchshoferSCCH closed 1 year ago
Actually, I always use camelCase or PascalCase styles for my code. Naming style checks are just something I did on the side because there were no plugins involved in Lua. In my earliest version, it only allowed numbers to appear at the end of identifiers. After looking at a lot of code, I realized this wasn't adequate, so I changed the way the checks were done. The issue with snake_case was simply because at that time, I didn't deal with the underscore followed by a number. Actually, I haven't read any specific naming conventions, I just rely on my intuition.
This might be more of a question than an issue.
It was encountered that when using the namestyle
upper-snake-case
, a variable name likeCONSTANT_VALUE_1
does cause a namestyle violation, butCONSTANT_VALUE1
doesn't.There are arguments for both variants to be the "correct" snake-case, so I mainly want to ask: Is your understanding of
snake_case
andupper_snake_case
that numerical components have to be prefixed with letters, or could it be adapted in the implementations ofsnake_case
andupper_snake_case
themselves?Of course, there's always the options to implement any custom namestyle variant with a regular expression, but if there are predefined styles, the configuration ends up simpler.