Whitespace after comment with latest update
clayne100
Posts: 7 Bronze 2
in SQL Prompt
I just updated to version 10.13.16.3650. I don't remember the version I was on before but it was less than 6 months old. When I reformat now, I am getting a single whitespace row after comments. I did not get this before. I found the setting where I can set how many empty rows between statements, which appears to control this. Is there anyway to have 0 after comments and 1 after statements?
This is what I had before, and what I want.
I am getting this.
Any suggestions would be appreciated.
This is what I had before, and what I want.
/* Create items that do not exist */
DECLARE @Item ItemType
/* Create items that do not exist */
DECLARE @Item ItemType
Any suggestions would be appreciated.
Tagged:
Answers
Hi @clayne100
Thank you for reaching out on the Redgate forums regarding your formatting question.
I am testing this in v13.14.0 and not finding the same spacing - are you able to patch up to a current version and confirm if this behaviour is still occurring.
Download link for latest version available here:
https://download.red-gate.com/checkforupdates/SQLPrompt/SQLPrompt_10.14.0.4064.exe
If the spacing behaviour is still occurring after patching - can you provide a copy of your format style, so I can investigate further.
The file will be in the folder nominated here:
You can use the following secure link to provide your file - this link will be valid for 14 days
https://files.red-gate.com/requests/RQUt35NJTSxvQrvINnDdYv
What I get when using the following settings:
It is now inserting a line between the comment and the query. If there is no space between the comment and the query, I would expect the comment to be treated as part of the query.
I'm not sure about the final comment being aligned with the comment about the where clause either. It doesn't do that for the first query.
This is a change of behaviour from previous versions.
I'm using version 10.14.0.4064.