| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
In BigQuery (and any dialect allowing dashes inside identifiers) the denseOperators option turned "a - b" into "a-b", which then re-parses as a single dashed identifier - corrupting the query. Skip densing the "-" operator for those dialects so the output round-trips.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: e3b36fa7-e8ec-4e96-8e6c-d7df6cadcf9f 📥 CommitsReviewing files that changed from the base of the PR and between f3707ba and 68e8f71. 📒 Files selected for processing (4)
📝 Walkthrough WalkthroughThe PR adds support for dialect-specific handling of the minus operator to prevent accidental merging of a - b into dashed identifiers in dialects like BigQuery. A new identifierDashes flag flows from tokenizer configuration through dialect setup and into operator formatting logic, with supporting test coverage. ChangesIdentifier dashes operator spacing
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem🚥 Pre-merge checks | ✅ 4 | ❌ 1 ❌ Failed checks (1 warning)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches 🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. ❤️ ShareComment @coderabbitai help to get the list of available commands and usage tips. |
Sorry, something went wrong.
|
Hi, sorry for the delay. This is probably the best pull request I've received over the years. Very well thought through fix for this quirky bug. Thanks a lot. |
Sorry, something went wrong.
|
Released in 15.8.2 |
Sorry, something went wrong.
|
@coderabbitai why did you write this?
and can you suppress it for all future reviews? |
Sorry, something went wrong.
|
Tip For best results, initiate chat on the files or code changes. ⚙️ CodeRabbit configuration inspected Length of output: 5107 @karlhorky That comment came from the pre-merge checks – docstrings feature, which is currently configured with: pre_merge_checks:
docstrings:
mode: warning
threshold: 80It checks docstring coverage across changed files and warns when it falls below the 80% threshold. For a TypeScript SQL formatter library, that threshold is definitely not a sensible default. To disable it, add (or update) a .coderabbit.yaml at the root of the repository with: reviews:
pre_merge_checks:
docstrings:
mode: disabledThat will stop the check from running on future PRs entirely. Alternatively, you can lower threshold to 0 if you'd prefer to keep the infrastructure in place but silence the warnings. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
With denseOperators: true on BigQuery, a subtraction like a - b comes out as a-b. That's not just ugly: BigQuery allows dashes inside identifiers, so the densed output re-parses as a single identifier a-b, and format(format(sql)) no longer matches format(sql). a - foo(y) is worse — it becomes a-foo (y), turning the expression into an identifier followed by a call.
The fix is to leave the - operator spaced in dialects that allow dashed identifiers (currently just BigQuery). I derived that flag from the existing identChars.dashes tokenizer option so there's a single source of truth. Numeric cases like 1 - 2 were already safe (the - is parsed into the literal), so this only affects the identifier case.
The shared dense-operator test in operators.ts was actually asserting the broken foo-bar output for BigQuery; I scoped that to the dashed-identifier dialects and added a BigQuery regression test.
Summary by CodeRabbit
Release Notes