https://kotlinlang.org logo
Title
e

eygraber

04/24/2023, 4:21 AM
Before I open an issue for it, I tried out
BracesOnWhenStatements
with the following config:
BracesOnWhenStatements:
    active: true
    singleLine: 'necessary'
    multiLine: 'necessary'
If I have a
when
with a clause that does no handling, I typically use
{}
because I like how it looks vs
Unit
(depending on the use case), but
BracesOnWhenStatements
reports that as a violation. Is that working as intended, or should the case of a clause with no handling be an exception?
There are also some edge cases there where I have braces with just comments inside the braces
b

Brais Gabin

04/24/2023, 7:07 AM
You can open an issue to talk about those two cases. They sound reasonable.