Skip to content

feat(lsp): report unparseable sections as warnings#2155

Open
benfdking wants to merge 2 commits intomainfrom
claude/lsp-unparseable-warnings-xNIRP
Open

feat(lsp): report unparseable sections as warnings#2155
benfdking wants to merge 2 commits intomainfrom
claude/lsp-unparseable-warnings-xNIRP

Conversation

@benfdking
Copy link
Collaborator

Enable parse error reporting in the LSP by passing true for the
include_parse_errors parameter when creating the Linter. This causes
unparseable SQL sections to appear as warnings in editors, helping users
identify syntax issues.

Enable parse error reporting in the LSP by passing `true` for the
`include_parse_errors` parameter when creating the Linter. This causes
unparseable SQL sections to appear as warnings in editors, helping users
identify syntax issues.
Add a new configuration section [sqruff:lsp] with a parse_errors option
that controls whether unparseable SQL sections are reported as warnings.
The option defaults to true (enabled).

Config example:
  [sqruff:lsp]
  parse_errors = false

Changes:
- Add [sqlfluff:lsp] section to default_config.cfg
- Add lsp_parse_errors() method to FluffConfig
- Add set_include_parse_errors() method to Linter
- Update LSP to read config value on init and config reload
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 11, 2026

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing claude/lsp-unparseable-warnings-xNIRP (7138d02) with main (51cb77e)

Open in CodSpeed

@github-actions
Copy link

Benchmark for 42727ac

Click to view benchmark
Test Base PR %
DepthMap::from_parent 52.8±0.76µs 51.9±1.16µs -1.70%
fix_complex_query 12.5±0.09ms 12.5±0.30ms 0.00%
fix_superlong 169.4±9.25ms 165.2±13.59ms -2.48%
parse_complex_query 4.1±0.05µs 4.2±0.06µs +2.44%
parse_expression_recursion 7.6±0.09µs 7.3±0.28µs -3.95%
parse_simple_query 1057.3±13.64ns 1066.6±17.19ns +0.88%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants