Comments
6 comments
-
I just turned the "Indent contents" under "Schema statements" on while leaving the option "IndentBeginToken" set to False and now the initial begin statement of my stored procedure does NOT indent which is what I was trying to achieve! So now it works exactly how I want but this seems like a small issue.
To recap:
1. Set IndentBeginToken to False in the RedGate_SqlPrompt_Format_Layout_LayoutOptions.xml file.
2. Uncheck "Indent contents" under "Schema statement"
3. Run formatting and contents Do indent
4. Check "Indent contents" and rerun formatting and contents do Not indent
-Dave -
Thanks for your post.
Is it working as per your expectation now?
Do you need any help with this (I am bit confused)?
-
Sorry for not being clear. The result is exactly what I want but the settings to achieve the result are not what I expected. The issue appears to be that there is a conflict between the IndentBeginToken setting and the DoNotIndentProcedureContents setting in RedGate_SqlPrompt_Format_Layout_LayoutOptions.xml.
If I set IndentBeginToken = False and DoNotIndentProcedureContents = True, my stored procedure contents are indented.
If I set IndentBeginToken = False and DoNotIndentProcedureContents = False, my stored procedure contents are NOT indented.
This means that the DoNotIndentProcedureContents logic is backwards when IndentBeginToken = False.
-Dave -
I don't think doing changes in Config file will help.
Can you let me know the issue you are having and what exact formatting you need I will try replicating it at my end?
After investigating I can either log a bug or feature request for you (if needed)? -
I'm trying to report a bug. The bug is that the setting DoNotIndentProcedureContents does not work correctly when IndentBeginToken equal False. The bug is reproduced by editing the config file because there is no way to change the IndentBeginToken setting through the UI. The edits I made are:
CASE 1:IndentBeginToken = False DoNotIndentProcedureContents = True
PROBLEM:
This causes the contents of a stored procedure to be indented. It should not.
CASE 2:IndentBeginToken = False DoNotIndentProcedureContents = False
PROBLEM:
This causes the contents of a stored procedure to not be indented. It should be indented.
If you set IndentBeginToken to True, then DoNotIndentProcedureContents works as expected.
-Dave -
Thanks for your post Dave!
I have forwarded your issue to development guys.
They will have a look at it.
Add comment
Please sign in to leave a comment.
It would be nice if the schema block did not indent when this setting is changed.