-
Notifications
You must be signed in to change notification settings - Fork 802
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
SQL comments have one too many newlines for GoDocs #1393
Comments
I can't reproduce this on the playground (here's my example). Can you include your configuration in the ticket? |
@kyleconroy This is the output I got:
|
I also added my config to the original message |
Weirdly enough I had one function that did properly space the comments and generated go function... |
@kyleconroy I can confirm it only happens with |
@kyleconroy Awesome, would it wait for a 1.12 release or a 1.11.1? |
The original fix (sqlc-dev#1395) for sqlc-dev#1393 did not cover the case where `emit_methods_with_db_argument` was set to `true`. This follows the same pattern to handle that case as well.
Version
1.11.0
What happened?
For example, if I have the table with the comment
The following go code is generated:
You can see there is an extra line between the comment and the function, which does not allow the comments to appear as godocs.
It would be sublime if that newline was removed so the comment and function were touching, thus being able to write godocs in the SQL :)
Relevant log output
No response
Database schema
No response
SQL queries
No response
Configuration
Playground URL
https://play.sqlc.dev/p/19da31cef1e9d4ce1385c4d620f2bcfad53be81567e1df81551f59e9fb8b39b8
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: