feat(lsp): report unparseable sections as warnings#2155
Open
feat(lsp): report unparseable sections as warnings#2155
Conversation
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
Benchmark for 42727acClick to view benchmark
|
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.
Enable parse error reporting in the LSP by passing
truefor theinclude_parse_errorsparameter when creating the Linter. This causesunparseable SQL sections to appear as warnings in editors, helping users
identify syntax issues.