fwcd / fwcd/kotlin-language-server
Unmatched Parenthesis parse errors outside expressions are not always reported
- Dominant language
- Kotlin
- Stars
- 2k
- Forks
- 252
- PR merge metrics
- No merged PRs in 30d
Description
There are some parse errors, caused by unmatched parenthesis or braces outside expressions, that are not reported by the server diagnostics.
For example starting with this valid file:
```kotlin
fun main(args: Array) {
println("Hello World!")
}
```
If an open parenthesis, closed parenthesis or closed brace is added at the end of the file, no error is reported. For example adding these characters triggers no errors:
```kotlin
fun main(args: Array) {
println("Hello World!")
}
()}[]
```
With open braces instead an error is correctly reported at the start of the line
```kotlin
fun main(args: Array) {
println("Hello World!")
}
{}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue using the valid Kotlin file and the unmatched delimiters shown in the examples, then trace how server diagnostics handle parse errors outside expressions. Check the parser-to-diagnostics path for parentheses and braces. Done means the added unmatched delimiters consistently produce diagnostics while the valid file remains error-free.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100