Formatting issues with comments /* */, and I can't figure out if it is something in my formatting style that is causing this, or maybe if it's just not addressed. Here is what my code looks like after it is formatted, and below it is how I would like it to look. I'm trying to have the /* comment beginning line up with ending comment line. Thank you.
After Formatting:
/********************************************************************************************************
DML
********************************************************************************************************/
/****************************************************************************************************
Set the Try/Catch error variables here
****************************************************************************************************/
SET @ErrorNumber = 0
SET @SERVERNAME
/****************************************************************************************************
prevent
****************************************************************************************************/
SET DATEFIRST 7;
/****************************************************************************************************
Determine the Cutoff
****************************************************************************************************/
SET @CutoffDate = DATEADD(YEAR, @NumberOfYears, @StartDate)
How I would like it to look:
/********************************************************************************************************
DML
********************************************************************************************************/
/****************************************************************************************************
Set the Try/Catch error variables here
****************************************************************************************************/
SET @ErrorNumber = 0
SET @SERVERNAME
/****************************************************************************************************
prevent
****************************************************************************************************/
SET DATEFIRST 7;
/****************************************************************************************************
Determine the Cutoff
****************************************************************************************************/
SET @CutoffDate = DATEADD(YEAR, @NumberOfYears, @StartDate)
Comments
5 comments
-
@S_in_AZ
Could you attach your format style so I can take a look for you?
Thanks -
I attached the format style to original post. I want to keep Lists/Indent list items ON (set at 4 spaces) to format lists etc.
-
@S_in_AZ
Apologies for missing your format file from the original post!
I couldn't get the code formated as requested either so I escalated it to the development for advice.
I'll be sure to keep you posted. -
@S_in_AZ
Thanks for your patience.
The development team confirmed this is not possible in SQL Prompt at the moment, unfortunately. Could you leave your suggestion on our user voice forum? https://redgate.uservoice.com/forums/94413-sql-prompt
Thanks! -
What is the setting that is causing the first line of the comment to indent? I'm having a similar issue where sql prompt formatting is indenting the first line on our preferred formatting but when I check against an out of the box format it does not indent the first line of the block comment. Nothing is popping out as the obvious setting to me.
Thanks in advance.
Add comment
Please sign in to leave a comment.