-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make R diagnostics less aggressive #2943
Comments
We'd really like to make tree-sitter-r play as nicely as possible with tree-sitter's error recovery, but to do that we need an example of the code that caused the squiggles in the image above. If you can recreate that state or a similar one and provide a reprex for it, we can see if it is the same problem as the ones mentioned in r-lib/tree-sitter-r#90, which would provide even more motivation for putting the work in to fix that |
Yes I definitely think it was an unmatched delimiter. In the test file in the screenshot, if I delete any parenthesis or brace, the entire file immediately lights up with the diagnostic. So yes the same problem as r-lib/tree-sitter-r#90. |
Another case where the whole editor gets linted: insert this somewhere in the file: |
Also test against #4177 |
Verified Fixed
Test scenario(s)Looks great with: Let's say we want to use with to change things in a list (not my favorite way of doing things, but...)asd = list() asd$abc = 2 If Iwith( asd, { If I forget this closing parenthesis, the whole with gets marked.that's not very helpful if the with block is a little long.
} ) a = sum(abc * 2 b = 123 Link(s) to TestRail test cases run or created: |
Summarizing a slack discussion.
This screenshot is me in the middle of a "copy/paste/edit" maneuver where I'm creating a new test from an existing one.
It's easy for the code to travel through an invalid state while you're finishing what you started.
I find the diagnostics that appear so overwhelming that it actually makes it harder for me to get back to the happy state of syntactically valid code.
Three possible angles on this:
unmatched_delimiter
after all r-lib/tree-sitter-r#90. It is possible this is the only thing to act on.The text was updated successfully, but these errors were encountered: