Hi! Just testing ktlint for the first time. I am g...
# ktlint
h
Hi! Just testing ktlint for the first time. I am getting some weird encoding errors when I open the report with VSCode. A lot of
[90m
and similar characters:
[90m/Users/henning.bunk/repos/work/wetter-app/[0mbuild.gradle.kts[90m:[0m38[90m:9:[0m Missing space after //
Any idea how to get rid of them? I am on Mac and execute ktlint via gradle
s
Which reporter are you using? I wonder if it's trying to color the output for console display
h
Just had a look at the report in the cli (fish) these lines are white and look fine. there are a few other lines which are red though
implemented ktlint via org.jlleitschuh.gradle.ktlint plugin. will have a look which reporter is default there
not super sure but I think it's the plain-reporter
r
yeah that looks like a color indeed.. do you set
outputColorName
perhaps in the config?
@Henning B just saw your question over at ktlint-gradle repo, you can try to unset it with
coloredOutput.set(false)
btw this is missing in the documentation I think @tapchicoma
t
@Henning B I've answered you in Github discussion
h
Thank you! Testing it now 🙂
@tapchicoma Had no impact initially but I found my mistake. I added the configuration block from https://github.com/JLLeitschuh/ktlint-gradle#configuration here to my project gradle file on the root level. Moving it into the subprojects { } like how it is described earlier fixes it. Thanks for your help and providing the plugin!
👍 2