.editorconfig formatting option to start new lines with commas + space rather than ending lines with comma
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Start by checking how .editorconfig options are represented and how the formatter handles SELECT clauses, IN lists, and object definitions. The work is complete when an opt-in setting produces leading commas with a space for those lists while preserving the existing behavior for function arguments.
Written by the indexing model from the issue text.
Description
I was redirected here to create this issue from: https://github.com/madskristensen/SqlFormatter/issues/24
Original request
Is your feature request related to a problem? Please describe.
My team standardizes on commas being placed at the beginning of a line rather than at the end of the line. This would be for lists specfically, not necessarily function arguments. For example: the SELECT clause primarily, but also includes IN lists, object definitions (parameter lists, column lists, etc.)) This formatter doesn't appear to support this code standard. I'd love for our team to use a formatter to follow our code standards such as this one.
Describe the solution you'd like
I would like an opt-in option for the .editorconfig to allow for this format:
SELECT
u.Id
, u.Name
, u.Email
FROM Users u
I think the formatter also places the first column on the same line as the SELECT and uses AS for aliasing, but that's a compromise my team can live with.
Describe alternatives you've considered
It seems like we would have to build our own Visual Studio extension?
Additional context
This online formatter provides this option. https://www.dpriver.com/pp/sqlformat.htm
- Dominant language
- GAP
- Stars
- 277
- Forks
- 43
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/SqlScriptDOM
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
microsoft/SqlScriptDOM#228 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
microsoft/SqlScriptDOM#183 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 56/100
microsoft/SqlScriptDOM#226 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/SqlScriptDOM#225 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
microsoft/SqlScriptDOM#224 ·
All issues in microsoft/SqlScriptDOM
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
AstrBotDevs/AstrBot#10205 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OHDSI/Data2Evidence#3394 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100