• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sql-formatter-org / sql-formatter / 7057978882
96%

Build:
DEFAULT BRANCH: master
Ran 01 Dec 2023 09:09AM UTC
Jobs 1
Files 79
Run time 21s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Dec 2023 09:08AM UTC coverage: 95.509% (-0.09%) from 95.601%
7057978882

push

github

web-flow
Switch from `flatKeywordList()` to flat arrays (#676)

Part of preparations for PR #673

Copied from [my original
comment](https://github.com/sql-formatter-org/sql-formatter/pull/673#issuecomment-1830518684):

I see there is no distinction in the keyword tokens between `all` and
`dataType` / `datatype` / `dataTypes`:


https://github.com/sql-formatter-org/sql-formatter/blob/<a class=hub.com/sql-formatter-org/sql-formatter/commit/<a class="double-link" href="https://git"><a class=hub.com/sql-formatter-org/sql-formatter/commit/<a class="double-link" href="https://git"><a class=hub.com/sql-formatter-org/sql-formatter/commit/<a class="double-link" href="https://git"><a class=hub.com/sql-formatter-org/sql-formatter/commit/290f3b767492d5e3204866447f9f4e4c098f825f">290f3b767/src/languages/postgresql/postgresql.keywords.ts#L4-L8


https://github.com/sql-formatter-org/sql-formatter/blob/290f3b767492d5e3204866447f9f4e4c098f825f/src/languages/transactsql/transactsql.functions.ts#L78-L83


https://github.com/sql-formatter-org/sql-formatter/blob/290f3b767492d5e3204866447f9f4e4c098f825f/src/languages/snowflake/snowflake.keywords.ts#L102-L106


https://github.com/sql-formatter-org/sql-formatter/blob/290f3b767492d5e3204866447f9f4e4c098f825f/src/languages/transactsql/transactsql.functions.ts#L303-L309

This is because of the `flatKeywordList()` function, which effectively
discards the key information:


https://github.com/sql-formatter-org/sql-formatter/blob/290f3b767492d5e3204866447f9f4e4c098f825f/src/utils.ts#L18-L20

Because of this, I would like to simplify the
`src/languages/*/*.keywords.ts` files to export 1 flat array (with empty
lines + comments as separators instead of object keys) and delete the
`flatKeywordList()` function - this will prevent unusual, inconsistent
naming conventions and also clarify that the object keys do nothing.

## Reviewer notes

1. Best to review this with whitespace changes turned off:
https://github.com/sql-formatter-org/sql-formatter/pull/676/files?w=1
2. This PR also enables GitHub Actions workflows CI for pull requests on
branches other than `master` and `develop`, so that PRs from community
members can be tested on GitHub Actions
3. while removing the object keys, I added comments as such:
a. if there was a commented URL above the key, I remov... (continued)

512 of 575 branches covered (0.0%)

Branch coverage included in aggregate %.

34 of 34 new or added lines in 34 files covered. (100.0%)

1147 of 1162 relevant lines covered (98.71%)

12730.64 hits per line

Jobs
ID Job ID Ran Files Coverage
1 7057978882.1 01 Dec 2023 09:09AM UTC 0
95.51
GitHub Action Run
Source Files on build 7057978882
Detailed source file information is not available for this build.
  • Back to Repo
  • 8641a84e on github
  • Prev Build on master (#6971436019)
  • Next Build on master (#7062281498)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc