How can we help you today? How can we help you today?

end-of-line comments moved around strangely

I really like what I see so far in this product, and hope it succeeds.

I don't know if there's a good way to implement this, and I can understand why this would happen (presumably a goal to change nothing but whitespace and case), but it would be really cool if the program were smart enough to handle this situation in a more elegant way.

The code below is an example where I have a short comment at the end of a line giving examples of the values I expect from @level1
ALTER PROCEDURE [dbo].[build_cube_pr] 
	@level1 varchar(20) = NULL, --e.g. Oracle, SQL Server, ...
	@level2 varchar(100) = NULL,
	@level3 varchar(100) = NULL,
	@level4 varchar(100) = NULL
AS
BEGIN

Given my other preferences (move commas to the beginning of the line, which is something I only do with the help of a code formatter), this is what it becomes:
ALTER PROCEDURE [dbo].[build_cube_pr]
      @level1 varchar(20) = NULL
    , --e.g. Oracle, SQL Server, ...
    @level2 varchar(100) = NULL
    , @level3 varchar(100) = NULL
    , @level4 varchar(100) = NULL
AS 
    BEGIN

That makes it seem as though the commend goes with the next line. I would prefer it transform instead to:
ALTER PROCEDURE [dbo].[build_cube_pr]
      @level1 varchar(20) = NULL --e.g. Oracle, SQL Server, ...
    , @level2 varchar(100) = NULL
    , @level3 varchar(100) = NULL
    , @level4 varchar(100) = NULL
AS 
    BEGIN

Tricky, I know.
majahanson311
0

Comments

1 comment

  • Andras B
    I really like what I see so far in this product, and hope it succeeds.

    I don't know if there's a good way to implement this, and I can understand why this would happen (presumably a goal to change nothing but whitespace and case), but it would be really cool if the program were smart enough to handle this situation in a more elegant way.
    ....

    Tricky, I know.

    It is indeed tricky :). We will not be able to do this for the first release, but we will look at it in the future.
    Regards,
    Andras
    Andras B
    0

Add comment

Please sign in to leave a comment.