Repository navigation
feat(editor): configurable SQL formatter rules - #3740
Merged
Merged
Conversation
…ules # Conflicts: # apple/TablePro/Resources/Localizable.xcstrings
datlechin
enabled auto-merge (squash)
October 21, 2026 05:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.sql-formatter.jsonin a linked SQL folder applies to files opened from it: the nearest one from the file's folder up to the linked folder root. One that can't be read (bad value, not JSON, over 64 KB, not a regular file) stops Format Query with an error sheet naming it.formattersettings record, so an older build re-uploading the editor blob can't reset them. A Mac upgrading to this build fetches the zone once to pick up a formatter record it skipped.count(*), not a column namedcount), never on an engine whose dialect says function names are case-sensitive (ClickHouse), and never on a qualified name (dbo.len(x)).concat(a,\n b))EXTRACT(YEAR FROM d),FILTER (WHERE …),STRING_AGG(… ORDER BY …))CHARACTER SET,WITH TIME ZONEandON DELETE CASCADEno longer break a CREATE TABLE column listEXPLAIN SELECTandEXPLAIN UPDATEno longer come out asEXPLAINSELECTFOR UPDATE,ON DUPLICATE KEY UPDATE a = VALUES(a)andGRANT SELECT, INSERTstay on their linee.endno longer splits intoe.andEND,t.keykeeps its caseTest plan
SQLFormatterServiceTests: exact output for every option, each fixed case, and idempotency under option sets. The fixed cases fail on main.SQLFormatterRulesTests: rules file round trip, strict decode errors, size cap, symlink to/dev/zerorefused, settings resolution, export on one Mac and import on another formats identically, storage and reset, sync category and upgrade refetch, linked folder lookup.Not in this PR
NATURAL LEFT JOINbreaks afterNATURAL(same on main).AppSettingsManager.resetToDefaults()andAppSettingsStorage.resetToDefaults()skip it.Fixes #2529