Malte
03/27/2025, 7:49 AMelse
branch for when
that have an enum as subject? i.e. i want to make ktlint recognize when(someEnum) {else -> … }
- and raise an issue of coursePaul Dingemans
03/27/2025, 8:16 AMMalte
03/27/2025, 8:18 AMPaul Dingemans
03/27/2025, 8:21 AMMalte
03/27/2025, 1:25 PMKlitos Kyriacou
03/28/2025, 11:41 AMelse
part matches only a small number of cases (e.g. 3 or fewer). If you had an enum with 20 constants, and your when
clause does something for cases of 2 or 3 of them, and something else for the rest of them, then an else
part is indeed the right thing to have and there should be no warning.Malte
03/28/2025, 12:07 PMPaul Dingemans
04/02/2025, 6:36 AM