You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ktlint doesn't allow semicolons at the end of a KDoc line. However, they are perfectly fine, as they are a natural language token, not a Kotlin token.
It seems this only happens when the KDoc contains references to code, e.g..: [x].
Note that just formatted code with a semicolon, e.g. `x`;, is accepted by ktlint.
The suggestion is to accept EOL semicolons in KDoc lines that contain Kotlin code.
The text was updated successfully, but these errors were encountered:
You're right, ktlint runs without problems on my original example. I'm editing it right away! Save it to file.kt and run ktlint file.kt, which results in /path/to/file.kt:2:7: Unnecessary semicolon.
erikhuizinga
changed the title
Semicolons (at end of line) in KDoc aren't allowed, but should be
Semicolons (at end of line) in KDoc aren't allowed on lines containing references, but should be
Mar 30, 2019
Ktlint doesn't accept the following:
Ktlint doesn't allow semicolons at the end of a KDoc line. However, they are perfectly fine, as they are a natural language token, not a Kotlin token.
It seems this only happens when the KDoc contains references to code, e.g..:
[x]
.Note that just formatted code with a semicolon, e.g.
`x`;
, is accepted by ktlint.The suggestion is to accept EOL semicolons in KDoc lines that contain Kotlin code.
The text was updated successfully, but these errors were encountered: