sql-formatter-org / sql-formatter-org/sql-formatter
[FORMATTING] Allow dense formatting of multiple square brackets after another
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 456
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 3
Description
Input data
Which SQL and options did you provide as input?
select foo['bar']['baz']['boz']
Expected Output
select
foo['bar']['baz']['boz']
Actual Output
select
foo['bar'] ['baz'] ['boz']
Usage
- How are you calling / using the library?
- I used the demo website
- What SQL language(s) does this apply to?
- I tested with
SnowflakeandPostgresql
- I tested with
- Which SQL Formatter version are you using?
- The latest one.
Infos
This is not breaking, afaik it works with spaces in between as well. However it looks a bit weird, so maybe we can figure this out?
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.
Research direction
Reproduce the reported SQL in the demo website or formatter entry point, comparing the expected and actual spacing around chained square-bracket expressions. Trace the formatting path for consecutive brackets and add coverage for the Snowflake and PostgreSQL examples if the test location is identified. Done means the brackets remain dense without spaces between them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, sql, typescript
- Domain
- databases, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100