Skip to content

Bug Report: Formatting moves comments unexpectedly #9

@Anthony-Fiddes

Description

@Anthony-Fiddes

I'm experiencing a curious bug where comments don't end up where I expect. In addition, if I keep formatting the text, the comments keep moving until they all settle on the same line.

Language: BigQuery

Text to format:

CREATE TEMP TABLE blah
-- comments
-- more comments
-- even more comments
(
date DATE NOT NULL
) AS
(
SELECT
bleep
FROM
bloop
);

Expected output:

CREATE TEMP TABLE blah 
-- comments
-- more comments
-- even more comments
(
  date DATE NOT NULL
) AS
  (
    SELECT
      bleep
    FROM bloop
  );

Actual output:

CREATE TEMP TABLE blah -- comments
-- more comments
-- even more comments
(
  date DATE NOT NULL
) AS
  (
    SELECT
      bleep
    FROM bloop
  );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions