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] 11.0.2 commaPositon after doesn't work well when come up with comment end with comma #505

Closed
MR-BH opened this issue Oct 24, 2022 · 2 comments
Labels

Comments

@MR-BH
Copy link

MR-BH commented Oct 24, 2022

Input data

Which SQL and options did you provide as input?

SELECT
  name, -- user name,
  COUNT(distinct address) -- address 
FROM
  user;

Expected Output

SELECT
  name -- user name,
, COUNT(distinct address) -- address 
FROM
  user;

Actual Output

SELECT
  name, -- user name
, COUNT(distinct address) -- address 
FROM
  user;

Usage

  • How are you calling / using the library?
    demo website & ESM
  • What SQL language(s) does this apply to?
    {
    language: 'spark',
    commaPosition: 'before',
    }
  • Which SQL Formatter version are you using?
    11.0.2
@MR-BH MR-BH added the bug label Oct 24, 2022
@nene
Copy link
Collaborator

nene commented Oct 24, 2022

Yeah, this is essentially the same bug as #236

The implementation of these features is just very problematic. I've kept them around, though maybe it would be altogether better to just drop these problematic features. For now there's no simple way to properly fix them.

Probably should add a warning to docs to label these as buggy/problematic.

@MR-BH
Copy link
Author

MR-BH commented Oct 27, 2022

I am a little busy right now, I will submit a Merge Request to fix this problem when I have some free time, maybe in December.

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