-
Notifications
You must be signed in to change notification settings - Fork 433
Closed
Labels
Description
Hi,
I noticed that when formatting SQL with inline comments and leading commas, the formatter moves comments to the end of the previous line and changes the comma placement.
Example SQL I want to keep:
INSERT INTO sco_progress_log(
rec_datetime
,log_type
/* __CF_IF5__ */
,caller_sco_id
/* __CF_IF6__ */
,complete_date
)
SELECT
__CF_PARAM0__
,'rireki'
,NULL
/* __CF_IF7__ */
,__CF_PARAM1__
/* __CF_IF8__ */
FROM sco_progress ins_data
WHERE user_id = __CF_PARAM2__
AND course_id = __CF_PARAM3__
AND sco_id = __CF_PARAM4__
Formatted result:
INSERT INTO
sco_progress_log (
rec_datetime,
log_type
/* __CF_IF5__ */
,
caller_sco_id
/* __CF_IF6__ */
,
complete_date
)
SELECT
__CF_PARAM0__,
'rireki',
NULL
/* __CF_IF7__ */
,
__CF_PARAM1__
/* __CF_IF8__ */
FROM
sco_progress ins_data
WHERE
user_id = __CF_PARAM2__
AND course_id = __CF_PARAM3__
AND sco_id = __CF_PARAM4__
Issues:
- Comments (
/* __CF_IFx__ */
) are moved to the previous line instead of staying on their own line. - Leading commas are reformatted.
Is there a way to preserve comment lines and leading commas? If not, could this be considered as a feature request?
Thanks!