You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Couldn't find option to disable upppercase ID for every _id field #2161
In reality people rarely follow it, due to KpmgWsUrl is easier to read than KPMGWSURL. However, sqlc also doesn't follow all acronyms, except for some reasons for ID. You may try this setting, but it seems not a wildcard so you will need to do it for all IDs.
@sergey-tb Thanks. If I use renaming settings conf then it's a never-ending amount of work.
Is it worth building a feature skipping initialisms for sqlc? As It says in go wiki
The code generated by the protocol buffer compiler is exempt from this rule. Human-written code is held to a higher standard than machine-written code.
And as go devs say - There's a never-ending list, we'll get it wrong, and it's simpler to stick with the current mechanical translation. (link)
@priyanshujain , I'm not a contributor of sqlc, but for sure agree initialism should be configured. I like how some linters do it, eg: initialism : ["id","url"]
Activity
priyanshujain commentedon Mar 20, 2023
As I can see here, There is intentional modification of
idtoID. Can you please help me understand the reason behind it? Thanks!sergey-tb commentedon Mar 26, 2023
@priyanshujain , it is because of this silly naming convention rule in Go.
In reality people rarely follow it, due to KpmgWsUrl is easier to read than KPMGWSURL. However, sqlc also doesn't follow all acronyms, except for some reasons for ID. You may try this setting, but it seems not a wildcard so you will need to do it for all IDs.
priyanshujain commentedon Mar 26, 2023
@sergey-tb Thanks. If I use renaming settings conf then it's a never-ending amount of work.
Is it worth building a feature skipping initialisms for sqlc? As It says in go wiki
And as go devs say - There's a never-ending list, we'll get it wrong, and it's simpler to stick with the current mechanical translation. (link)
Please let me know your thoughts. cc: @kyleconroy
sergey-tb commentedon Mar 26, 2023
@priyanshujain , I'm not a contributor of sqlc, but for sure agree initialism should be configured. I like how some linters do it, eg:
initialism : ["id","url"]