Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FORMATTING] Missing indent level of comment after CASE #698

Open
karlhorky opened this issue Jan 7, 2024 · 1 comment
Open

[FORMATTING] Missing indent level of comment after CASE #698

karlhorky opened this issue Jan 7, 2024 · 1 comment
Labels

Comments

@karlhorky
Copy link
Contributor

Input data

Which SQL and options did you provide as input?

SELECT
  a,
  CASE
    -- one
    WHEN a = 1 THEN 'one'
    -- two
    WHEN a = 2 THEN 'two'
    ELSE 'other'
  END
FROM
  test;

Expected Output

(unchanged)

SELECT
  a,
  CASE
    -- one
    WHEN a = 1 THEN 'one'
    -- two
    WHEN a = 2 THEN 'two'
    ELSE 'other'
  END
FROM
  test;

Actual Output

-- one is indented one level lesser than expected

SELECT
  a,
  CASE
  -- one
    WHEN a = 1 THEN 'one'
    -- two
    WHEN a = 2 THEN 'two'
    ELSE 'other'
  END
FROM
  test;

Usage

  • How are you calling / using the library? Demo on website
  • What SQL language(s) does this apply to? PostgreSQL
  • Which SQL Formatter version are you using? 15.0.2
@karlhorky karlhorky added the bug label Jan 7, 2024
@nene
Copy link
Collaborator

nene commented Jan 7, 2024

Thanks for reporting. This is essentially the same issue as #660

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants