Repository navigation
Conversation
A native lint response can report that the engine does not parse the project's dialect yet. Each such file now gets one L007 warning carrying the engine's reason, instead of looking lint-clean. A non-string reason is rejected as an invalid response.
…le and rules run compile and rules run kept only selected Rule codes, so an unavailable dialect looked clean there. L007 now passes through as a warning-severity Rule diagnostic in compile and is left out of rules run's failing-finding count. counts_toward_exit owns the exemption.
The plan and build rules gate failed on any finding, so an L007-only project could not plan. Rule exceptions also validate every finding's code as a rule code and rejected L007 with an invalid-lifecycle error. The gate now counts only findings that count toward exit, and L007 passes through rule exceptions unsuppressed. An end-to-end test replays a cached finding as L007 and as a rule code through compile, rules run, plan and build.
…nto feat/rule-facts-sqlquack
kvlonge
enabled auto-merge (squash)
November 8, 2026 03:44
kvlonge
disabled auto-merge
November 8, 2026 12:36
Contributor
Author
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.
Why
Stacked on #1350 (
L007). Built-in rules read query facts with Polyglot's parser, tokenizer and SQL generator. SQLQuack's shared parser builds the same tree and records source ranges, so no SQL generation is needed.Changes
3 < 7, is located from its node's source range. A cast type with no item range comes from the cast node's range.DATEDIFF/TIMEDIFF/TIMESTAMPDIFFdate part stays out of string literals.L007warning per model or SQL-test file, naming the dialect and rules.L007never changes an exit code. Syntax errors in parsed dialects still fail.E_GUARD_AST_DEPTH_EXCEEDED), not walked.sqlbuild-rulesdropspolyglot-sql. The Rules page gets a per-adapter support table.Verification
NUMBER(38, 3)from source vs a generatedDECIMAL(38, 3); these compare equal.cargo test -p sqlbuild-rules --lib: 104/104. Two-line literal comparisons fail without the node-range lookup; a 50k-term chain segfaults without the depth check.SQBRMODEL102, exit 1, on DuckDB and twoL007, exit 0, on BigQuery.DuckShop: already covers Snowflake
DATEDIFF('day', …)and CTE casts.