https://kotlinlang.org logo
#ktlint
Title
# ktlint
m

Marcin Wisniowski

02/16/2023, 2:43 PM
I’m using ktlint-gradle 11.2.0 and trying to use the baseline functionality. Running
ktlintGenerateBaseline
generated the baseline file correctly, but running
ktlintCheck
still fails, with the same errors that are included in the baseline file. Am I doing something wrong?
w

wakingrufus

02/16/2023, 4:04 PM
probably not. i had to change some stuff to get baselines to work in newer ktlint versions, and so a bug might have been introduced
there is an integration test that tests that it all works though, so it would be helpful to have some more details about your case to try to pin down the exact scenario
which ktlint version are yousetting?
m

Marcin Wisniowski

02/16/2023, 4:34 PM
I am not setting one explicitly, so whichever one the plugin uses by default.
Is there a known good version of ktlint to set?
w

wakingrufus

02/16/2023, 5:04 PM
anything over 0.41 shoudl work since that is when baseline support was added. the default in plugin versionj 11.2.0 is ktlint 0.47.1
the baseline support is different for 0.46 and 0.47, so you can set your version back to 0.45.2 fro now and see if that works
m

Marcin Wisniowski

02/17/2023, 10:43 AM
Thank you, it works correctly on 0.45.2.
w

wakingrufus

02/17/2023, 3:29 PM
ok cool. ill look into why it isnt working on newer versions
93 Views